Ionic serve unable to open url

My developer give me an apk and his code and I want to make changes in some layout.
The apk function wise is working just fine.
However, when use ionic serve, I found that page which related to open url will not work.Try to click it but not responsive

How to fix this?
Or I have missing something?

@bkcollection,

This is very high level description of your issue, try to elaborate it with the actual error or scenario with some screenshots or clips for getting proper help from the community.

example, I click on the news (dark shaded), it will not open, but no error pop out also. It works fine in apk though

This is the screenshot of the ionic serve --lab and also the CORS setting


If you are running it in browser, then open the console of browser, may be you have got some error over there which may be useful in identifying the actual issue.

Thanks
There are errors in chrome console. How shall I fix this?

Hi,
I think your developer used some cordova plugin to open that page or url,
cordova plugin doesn’t work on browser, so you need to check that in devices only.

By looking at error, it seems like you are trying to trigger an event of cordova which is not allowed in browser. Cordova plugins will only work in application inside actual devices and not in browser and that is why you are facing this issue.

is it anyway I can debug it on a pc? anything I shall install?

Nothing that you need to install in your application. But you can not test cordova plugin in browser. Cordova plugins are build for application only not for browser. As an alternative you can share your functionality which you want to achieve at this point so that anyone can suggest the better alternative for browser.

If You want to debug your apk installed on android device,

  1. plug usb cable to pc
  2. enable usb debugging in developer option and set as media transfer in transfer options in android device
  3. Run the app in device
  4. open “chrome://inspect” in pc
  5. in Remote Target area, your app url will come may be “localhost”
  6. click inspect below that url, developer option like console,application,network… same as common chrome developer option will open

In that you can debug your app.

I want to change the html,css files in the url that i want to open.
So as some pages that unable to open, due to same reason I guess.

At least I can make some small changes, view the output of new layout will do.
Simple method is welcome.

Thanks