14
Views
3
Comments
Solved by AI
[Zebra DataWedge Connector Plugin] Plugin not loaded - Zebra datawedge connector
Question
zebra-datawedge-connector-plugin
Mobile icon
Forge asset by João Lopes
Application Type
Mobile

HI,
I am getting error at below action where plugin is checking - 

typeof(window.plugins.intentShim) !== 'undefined'

Any input will be appreciated.

2023-12-26 10-35-28
OutSystems Neo
Staff
Solution by AI
AI Generated

To resolve the issue with the error checking typeof(window.plugins.intentShim) !== 'undefined' in an OutSystems action, you should follow these steps:

  1. Verify Plugin Installation: Ensure that the intentShim plugin is correctly installed in your application. To do this:

    • Go to Service Center > Your Application > Extensibility Configurations.
    • Check if the intentShim Cordova plugin is listed in the configurations. If it is missing, add the required plugin configurations, then re-generate your app package. For more details, refer to the documentation here: OS-MABS-PLG-40001.
  2. Validate Cordova Environment: The error could also occur if the app is running outside a Cordova environment, such as in a web browser. The flow shown in your image includes a check for IsCordovaDefined. Ensure that you correctly verify if the cordova object exists before proceeding further. For instance, in JavaScript, you can check:

    if (window.cordova) {
        // Cordova is available, proceed with plugin checks
    }
    
  3. Add Plugin Availability Checks: Since your action flow already has a check for IsCordovaDefined, make sure it is correctly implemented. If IsCordovaDefined.IsLoaded? or PluginIsLoaded.IsAvailable? evaluates to false, ensure that the failure path sets appropriate outputs or logs an error. This step is essential when relying on plugins that might not be properly loaded. Refer to File Viewer Plugin not working with OutSystems 11 for similar troubleshooting steps.

  4. Check for JavaScript Execution Timing: JavaScript that accesses window.plugins.intentShim must be executed only after the deviceready event. Ensure that your code is wrapped in a listener for deviceready, like so:

    document.addEventListener("deviceready", function() {
        if (typeof window.plugins.intentShim !== 'undefined') {
            // Plugin is available, proceed
        } else {
            // Plugin is not available, handle the error
        }
    }, false);
    
  5. Re-generate the App Package: If the plugin is working locally but not in your generated app on the device, try regenerating your app package after verifying the above steps. Uninstall the app from the device, reinstall the newly generated app, and test again. Similar steps were used to resolve a plugin issue here: File Viewer Plugin not working with OutSystems 11.

By following these checks and steps, you should be able to identify why the plugin is not detected and successfully resolve the issue. If the problem persists after completing these steps, consider reaching out to OutSystems support for additional guidance.

This answer was AI-generated. Please read it carefully and use the forums for clarifications
2023-03-13 10-26-05
Sriyamini

Hi,

I think this error occurs because window.plugins is undefined, which means the required Cordova plugin (intentShim) is not available or not loaded properly. So, you can refer this document. This may help your issue. if issue still persists you can support ticket for the above issue. 

Thanks,

Sriyamini J

2025-07-22 10-30-27
Mandar Deshpande

This error usually occurs when:

  • The plugin is not included in the app's build.
  • Native app build (APK/IPA) hasn't been generated after adding the plugin.
2023-12-26 10-35-28
OutSystems Neo
Staff
Solution by AI
AI Generated

To resolve the issue with the error checking typeof(window.plugins.intentShim) !== 'undefined' in an OutSystems action, you should follow these steps:

  1. Verify Plugin Installation: Ensure that the intentShim plugin is correctly installed in your application. To do this:

    • Go to Service Center > Your Application > Extensibility Configurations.
    • Check if the intentShim Cordova plugin is listed in the configurations. If it is missing, add the required plugin configurations, then re-generate your app package. For more details, refer to the documentation here: OS-MABS-PLG-40001.
  2. Validate Cordova Environment: The error could also occur if the app is running outside a Cordova environment, such as in a web browser. The flow shown in your image includes a check for IsCordovaDefined. Ensure that you correctly verify if the cordova object exists before proceeding further. For instance, in JavaScript, you can check:

    if (window.cordova) {
        // Cordova is available, proceed with plugin checks
    }
    
  3. Add Plugin Availability Checks: Since your action flow already has a check for IsCordovaDefined, make sure it is correctly implemented. If IsCordovaDefined.IsLoaded? or PluginIsLoaded.IsAvailable? evaluates to false, ensure that the failure path sets appropriate outputs or logs an error. This step is essential when relying on plugins that might not be properly loaded. Refer to File Viewer Plugin not working with OutSystems 11 for similar troubleshooting steps.

  4. Check for JavaScript Execution Timing: JavaScript that accesses window.plugins.intentShim must be executed only after the deviceready event. Ensure that your code is wrapped in a listener for deviceready, like so:

    document.addEventListener("deviceready", function() {
        if (typeof window.plugins.intentShim !== 'undefined') {
            // Plugin is available, proceed
        } else {
            // Plugin is not available, handle the error
        }
    }, false);
    
  5. Re-generate the App Package: If the plugin is working locally but not in your generated app on the device, try regenerating your app package after verifying the above steps. Uninstall the app from the device, reinstall the newly generated app, and test again. Similar steps were used to resolve a plugin issue here: File Viewer Plugin not working with OutSystems 11.

By following these checks and steps, you should be able to identify why the plugin is not detected and successfully resolve the issue. If the problem persists after completing these steps, consider reaching out to OutSystems support for additional guidance.

This answer was AI-generated. Please read it carefully and use the forums for clarifications
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.