Skip to content

Page change is removing/unbinding Plugin functions - $references[1]' is undefined #93

@aahad

Description

@aahad

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})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions