Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path-related exception when used with a plugin-less phonegap app #173

Open
zeke opened this issue Aug 18, 2016 · 3 comments
Open

Path-related exception when used with a plugin-less phonegap app #173

zeke opened this issue Aug 18, 2016 · 3 comments
Assignees
Labels

Comments

@zeke
Copy link

zeke commented Aug 18, 2016

Running the latest phonegap CLI on latest node on OS X, I see this in my server logs:

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.join (path.js:1213:7)
    at Object.handle (/usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/lib/middleware/cordova/cordova_plugins.js:18:33)
    at next (/usr/local/lib/node_modules/phonegap/node_modules/connect/lib/proto.js:193:15)
    at Object.handle (/usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/lib/middleware/cordova/cordova.js:33:13)
    at next (/usr/local/lib/node_modules/phonegap/node_modules/connect/lib/proto.js:193:15)
    at resume (/usr/local/lib/node_modules/phonegap/node_modules/connect/lib/middleware/static.js:65:7)
    at SendStream.error (/usr/local/lib/node_modules/phonegap/node_modules/connect/lib/middleware/static.js:80:37)
    at emitOne (events.js:96:13)
    at SendStream.emit (events.js:188:7)
$ phonegap -v
6.3.0

$ node -v
v6.4.0
@surajpindoria
Copy link
Collaborator

Hi @zeke,

I have noticed this every once in awhile but haven't found the proper repro steps. Can you give a few details as to how you came about this error?

@zeke
Copy link
Author

zeke commented Aug 18, 2016

I'm on OS X, node 6.4.0, phonegap 6.3.0

I installed the PhoneGap desktop app, created a new project with it, ran the server from the desktop app, tried to connect with the iOS app, failed a few times, then decided to try running the server with the CLI instead. That didn't work either, but quitting the iOS app and restarting it seemed to do the trick.

I made no modifications to the generated project before running the server.

Hope that helps. Let me know if you need more info.

@surajpindoria surajpindoria added this to the Issues & Improvements milestone Aug 25, 2016
@surajpindoria surajpindoria self-assigned this Aug 25, 2016
@filmaj
Copy link
Collaborator

filmaj commented Apr 24, 2017

I can reproduce this every time with the latest phonegap-cli, as long as the project you are creating does not include plugins. Thus why the stack trace points to cordova-plugins.js middleware causing this error:

Object.handle (/usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/lib/middleware/cordova/cordova_plugins.js:18:33)

Repro steps - the key is to provide the blank template (so you get no cordova plugins):

$ phonegap create pathtest --template blank
$ cd pathtest
$ phonegap -d serve
$ # wait until the serve is listening, then load up the URL in your browser

@filmaj filmaj changed the title TypeError: Path must be a string. Received undefined Path-related exception when used with a plugin-less phonegap app Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants