You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an error occurs while the page is loading, it can cause the update/refresh logic to fail to initialize or halt entirely.
Steps to Reproduce
Can someone please provide a small example that reproduces this error.
Discuss
Can we prevent this from occurring? If not, can we detect that the Mobile app is not refreshing from the client-side (CLI) or native-side (mobile app)?
The text was updated successfully, but these errors were encountered:
@mwbrooks I do not recall the specific bug that caused my script to stop but anything that prevents a page from loading properly should do the trick.
A simple bug that should cause this issue is calling an undefined variable:
console.log('This will appear on console');
var b = a;
console.log('This will not appear in console');
Adding this to your JavaScript should throw an error and stop any further JS from loading, which seems to be what is causing the PhoneGap Developer app from refreshing.
So far the best way to debug javascript errors is through:
// err: error message
// fileName: which file error occurs in
// lineNumber: what line error occurs on
window.onerror = function (err, fileName, lineNumber) {
// alert or console.log a message
alert(fileName, 'Line:', lineNumber, 'Error:', e.message);
};
However, the user themselves have to put that in their app in order to see if an error fires or not. It might be worthwhile having that snippet within the developer mode plugin. Maybe have our own error reporter callback?
There are plans for using multi-webviews in the developer app, but that's a feature that will be coming sometime later this year. However, even using that doesn't quite solve broken js, but it will the user to easily go back to the main input screen.
Original issue
#291
Overview
When an error occurs while the page is loading, it can cause the update/refresh logic to fail to initialize or halt entirely.
Steps to Reproduce
Can someone please provide a small example that reproduces this error.
Discuss
Can we prevent this from occurring? If not, can we detect that the Mobile app is not refreshing from the client-side (CLI) or native-side (mobile app)?
The text was updated successfully, but these errors were encountered: