We are facing an issue in which loaded plugins are being unbounded/undefined.
Case 1: Our apps open XWebview with a "/login" URL and then user enters credentials to go inside "/dashboard" of the App. Now in this flow all the loaded plugins work well.
Flow 1: login -> dashbaord
Case 2: But when user logs in and then logs out of the app and goes back to "/login" screen and then tries to login again to go to "/dashboard", then the already loaded plugins do not work.
Flow 2: login -> dashboard -> logout ->login -> dashboard
- login & logout pages URL = /login-page
- dashboard page URL = /dashboard-page
In case 2: the already loaded plugins are not working. And am getting below exception.
Error: Optional(Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=1, WKJavaScriptExceptionMessage=TypeError: Plugin.PdfPreview.$references[1] is not a function. (In 'Plugin.PdfPreview.$references[1]("true")', 'Plugin.PdfPreview.$references[1]' is undefined), WKJavaScriptExceptionSourceURL=http://localhost:8080/myserver/abc/dashboard-page, NSLocalizedDescription=A JavaScript exception occurred, WKJavaScriptExceptionColumnNumber=65})
We are facing an issue in which loaded plugins are being unbounded/undefined.
Case 1: Our apps open XWebview with a "/login" URL and then user enters credentials to go inside "/dashboard" of the App. Now in this flow all the loaded plugins work well.
Flow 1: login -> dashbaord
Case 2: But when user logs in and then logs out of the app and goes back to "/login" screen and then tries to login again to go to "/dashboard", then the already loaded plugins do not work.
Flow 2: login -> dashboard -> logout ->login -> dashboard
In case 2: the already loaded plugins are not working. And am getting below exception.
Error: Optional(Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=1, WKJavaScriptExceptionMessage=TypeError: Plugin.PdfPreview.$references[1] is not a function. (In 'Plugin.PdfPreview.$references[1]("true")', 'Plugin.PdfPreview.$references[1]' is undefined), WKJavaScriptExceptionSourceURL=http://localhost:8080/myserver/abc/dashboard-page, NSLocalizedDescription=A JavaScript exception occurred, WKJavaScriptExceptionColumnNumber=65})