Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

The serve command reloads the page without any changes #821

Open
AntonyDamico opened this issue Nov 22, 2019 · 2 comments
Open

The serve command reloads the page without any changes #821

AntonyDamico opened this issue Nov 22, 2019 · 2 comments

Comments

@AntonyDamico
Copy link

AntonyDamico commented Nov 22, 2019

When I create a new app with the phonegap-cli and I use serve, when oppening it on the browser it keeps reloading before doing anything I'm not changing the code, then it enters a loop of reloading. Maybe it has to do with an error message that appears abouth a path argument in cordova, but I have no idea.

PhoneGap CLI, node & npm versions

PhoneGap 9.0.0
node v12.11.0
npm 6.11.3
Firefox 70.0.1 (64-bit)

Expected Behaviour

Serve the app in the browser

Actual Behaviour

App is shown but it keeps reloading so I can't do anything with it

Steps to Reproduce

Create a new app and serve it with the cli
phonegap create myApp
cd myApp
phonegap serve

Error messages

[phonegap] starting app server...
[phonegap] listening on 192.168.56.1:3000
[phonegap] listening on 192.168.1.50:3000
[phonegap]
[phonegap] ctrl-c to stop the server
[phonegap]
[phonegap] 200 /
[phonegap] 500 /cordova.js
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
    at validateString (internal/validators.js:112:11)
    at Object.join (path.js:375:7)
    at C:\Users\tonio\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect-phonegap\lib\middleware\cordova\cordova.js:21:33
    at call (C:\Users\tonio\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect\index.js:239:7)
    at next (C:\Users\tonio\AppData\Roaming\npm\node_modules\phonegap\node_modules\connect\index.js:183:5)
    at SendStream.error (C:\Users\tonio\AppData\Roaming\npm\node_modules\phonegap\node_modules\serve-static\index.js:121:7)
    at SendStream.emit (events.js:210:5)
    at SendStream.error (C:\Users\tonio\AppData\Roaming\npm\node_modules\phonegap\node_modules\send\index.js:270:17)
    at SendStream.onStatError (C:\Users\tonio\AppData\Roaming\npm\node_modules\phonegap\node_modules\send\index.js:421:12)
    at onstat (C:\Users\tonio\AppData\Roaming\npm\node_modules\phonegap\node_modules\send\index.js:726:26)
[phonegap] 200 /socket.io/socket.io.js
[phonegap] 200 /js/index.js
[phonegap] 200 /
[phonegap] 200 /css/index.css
[phonegap] 200 /socket.io/socket.io.js

From then on it keeps reloading

@AntonyDamico
Copy link
Author

I just realized that this only happens in firefox, the cli works fine in chrome. I would preffer to use firefox but at least I can work.

@ARehmanMahi
Copy link

This was driving me nuts, I followed your suggestion and used chrome and voila it works fine now. shame I cant use firefox.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants