Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.
This repository was archived by the owner on May 1, 2020. It is now read-only.

ionic serve Error opening the Browser #304

Closed

Description

@martinlombana

Short description of the problem:

ionic serve yields Error opening the Browser

What behavior are you expecting?

That it serves my app

Steps to reproduce:
It's tricky because sometimes it works, others it doesn't.

  1. Create a project
  2. ionic serve
  3. it hangs there and we can see that it is writing to ionic.config.json the line: "defaultBrowser": true
    Even if you remove it before executint the command.

Also if you force chrome, it doesn't work either.

Which @ionic/app-scripts version are you using?
Your system information:

Cordova CLI: 6.4.0
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.4
Ionic App Lib Version: 2.1.2
Ionic App Scripts Version: 0.0.39
OS: WINDOWS 10 x64 (By the way, not reported by ionic info)
Node Version: v6.4.0

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
(suntrack) D:\Sync\Martin\inProgress\p4q\suntrack_home>ionic serve -platform ios

Running 'serve:before' npm script before serve

ionic-hello-world@ watch D:\Sync\Martin\inProgress\p4q\suntrack_home
ionic-app-scripts watch

[23:46:46] ionic-app-scripts 0.0.39
[23:46:46] watch started ...
[23:46:46] build dev started ...
[23:46:46] clean started ...
[23:46:46] clean finished in 5 ms
[23:46:46] copy started ...
[23:46:46] transpile started ...
[23:46:47] lint started ...
[23:46:49] lint finished in 2.25 s
[23:46:50] transpile finished in 3.26 s
[23:46:50] webpack started ...
[23:46:50] copy finished in 3.40 s
[23:46:57] webpack finished in 7.29 s
[23:46:57] sass started ...
[23:46:58] sass finished in 1.47 s
[23:46:58] build dev finished in 12.09 s
[23:46:59] watch ready in 12.67 s
Running live reload server: http://localhost:true
Watching: www//*, !www/lib//, !www/**/.map
√ Running dev server: http://localhost:true
Error opening the browser - TypeError: s.replace is not a function
at escape (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\open\lib\open.js:62:12)
at open (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\open\lib\open.js:40:31)
at Object.openBrowser (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\serve.js:240:7)
at C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\serve.js:510:15
at _fulfilled (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:749:13)
at C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:557:44
at flush (C:\Users\marti\AppData\Roaming\npm\node_modules\ionic\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit

ionic $ q

Activity

  1. kashban commented on Nov 7, 2016

    @kashban

    Not sure if this is in any way related but I have also issues with ionic serve: For me it stops right after " build dev finished in..." and does not come back with anything.

  2. danbucholtz commented on Nov 7, 2016

    @danbucholtz
    Contributor

    Assigning @jthoms1 to take a look. We'll get this squared away.

    Thanks,
    Dan

  3. kashban commented on Nov 8, 2016

    @kashban

    I found the reason for my issue: It was the missing manifest.json file which was introduced somewhere between RC0 and RC2. After adding this to my src folder ionic serve works as expected.

  4. danbucholtz commented on Nov 10, 2016

    @danbucholtz
    Contributor

    Woot! Glad it's works @kashban!

    Thanks,
    Dan

  5. martinlombana commented on Nov 10, 2016

    @martinlombana
    Author

    ionic serve -platform ios

    still does not work and it messes ionic serve for consecuent launches.

    Please check that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions