Open adamduren opened 6 years ago
having the same issue using the --prod flag
@HartHerbert Does it work for you if you use ionic cordova run ios --aot --minifycss --optimizejs
? I believe that's all of the prod flags minus --minifyjs
. Trying to figure out of it's strictly uglifyjs
or a combination of things.
It's hard to tell if it works with only those flags ionic cordova run ios --aot --minifycss --optimizejs
because it doesnt fail everytime.
In my case I am using onic cordova run ios --aot --minifycss --release
I am using Ionic along with the WkWebView as suggested in my application and ran into an error where the app would continually crash when using the
--prod
flag. It continually tries to reload the app which triggers the issue again. Usually after reloading anywhere from 3-10 times it resolves itself. I tried varying various ionic options and found--minifyjs
to be the culprit.It seems like there might be two issues. One is that the WkWebView should not crash as a result of minified JavaScript. The second question of possible issue is Uglify doing something it shouldn't be doing?
I suspect that this has something to do with loading / rendering a large amount of data from the backend (firebase) although I can not explain why it only happens when minified. When I remove the data fetch it no longer occurs. Large in this case is relative but it started happening when I started querying for over 200 items.
We need a way to disable WkWebView from trying to automatically recover from a crash or to be able to set a maximum retry limit as it's making a massive amount of queries and burning through quotas. I can stop this in development but we have customers in production with this issue.
As far as debugging goes I cannot see if there are any console entries as the app crashes before I am able to attach the Safari debugger. Logs are also not being streamed to my console if they are being produced. I have attacked the stack trace of the failing thread and well as some console output from xcode.
In my debugging I switched back to
UIWebView
which did not have this issue.Relevant
package.json
entiriesStacktrace:
XCode Logs