prompt error “localhost:8100 says gap_init:3” mess

2020-03-13 08:33发布

while i do changes in any page code there is a prompt message "localhost:8100 says gap_init:3" shown. then I clicked 'ok' button another 5 messages shown. close browser and open it again work well. but do any changes it show this prompt. how to fix it?. thanks in advance prompt error message console was be like that console error

Console Error

6条回答
淡お忘
2楼-- · 2020-03-13 08:52

Just disable the prompt and you are on the go.

// include this before cordova.js

prompt = function() { return false; }

With that you could just ignore the prompted message because in the webview the prompt itself are disable.

查看更多
Summer. ? 凉城
3楼-- · 2020-03-13 08:55

I ran into the same issue. I was using ionic cordova run browser --livereload. Try changing the simulator to an iPhone in Chrome. Worked for me.

查看更多
Root(大扎)
4楼-- · 2020-03-13 08:57

This error you get when you use the following command directly as follows:

ionic serve
and then followed by 
ionic cordova build android --prod --release

I SUGGEST TO FOLLOW THIS METHOD, IF YOU WANT TO RUN THE APP IN BROWSER

ionic serve
ionic build
ionic build --prod

This way you get www folder where you can upload to server and check the whole app in browser directly

Then follow to make the app ready for google play store

ionic serve
ionic cordova build android --prod --release

查看更多
够拽才男人
5楼-- · 2020-03-13 09:01

I entered the following command in terminal continuously and directly in one time:

ionic serve ionic build ionic build --prod

Problem got away and gap_init:3 didn't show up.

查看更多
啃猪蹄的小仙女
6楼-- · 2020-03-13 09:03

Delete the cordova.js from the www folder

When I had this problem, I was playing around with different Ionic / Angular versions and their build tools. The problem for me boiled down to 2 different cordova.js files being included into the page. After quite some time I realized that I had an outdated cordova.js output file in my www folder. Clearing the whole folder solved the problem.

查看更多
兄弟一词,经得起流年.
7楼-- · 2020-03-13 09:15

After trying the above answers without success, I simply deleted the www folder and ionic serve again worked as expected

查看更多
登录 后发表回答