Skip to main content
Troubleshooting2 min read

Troubleshooting JavaScript Bridge Issues

Fix common JavaScript Bridge problems: window.wapp undefined, PLUGIN_NOT_ENABLED, BRIDGE_NOT_ALLOWED, PERMISSION_DENIED and platform differences.

Check these in order

  1. You are testing inside the app. window.wapp exists only in the app, never in a desktop or mobile browser.
  2. Your code runs after the bridge is ready. Use the wapp:ready event or wapp_library_ready(); see the quickstart.
  3. The page is allowed. With restrictions on, its URL must be listed in Website access.
  4. The plugin is on, in your plan, and in this build. Plugins are compiled in: build again after turning one on.
  5. The device permission is on in Permissions › Device and the user allowed it.
  6. Your site does not define its own wapp variable. If it does, turn off Define window.wapp.

By error code

CodeFix
window.wapp is undefinedTest in the app; wait for wapp:ready; check Website access and Define window.wapp
PLUGIN_NOT_ENABLEDdetails.reason says why: turn the plugin on, check your plan, or install a build made after turning it on
BRIDGE_NOT_ALLOWEDAdd the page's URL to Website access, or turn the restriction off
PERMISSION_DENIEDTurn the permission on and build again; if the user refused, explain and offer the settings
UNSUPPORTED_PLATFORMThe method is not available on this platform (for example Sign in with Apple on Android)
INVALID_PARAMSFix the parameter named in details.field
BUSYWait until the previous call of the same plugin finishes
TIMEOUTTry again; check the device's connection for network-based features

Works on Android but not on iOS (or the reverse)

  • The method may be platform-specific and answer UNSUPPORTED_PLATFORM.
  • Plugins and permissions are compiled per platform: build the other platform again after turning them on.
  • On iOS, the user may have refused the permission.

Debugging tips

  • Log every result: console.log(JSON.stringify(result)).
  • Use await wapp.plugins.list() to see which plugins this build has and why others are off.
  • Use each plugin's test page to rule out problems in your own code; see Native plugins overview.

Next steps