You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/02/12 23:27:56 UTC

[GitHub] [cordova-plugin-inappbrowser] anthonygacek opened a new issue #848: InAppBrowser Is Undefined During App Runtime

anthonygacek opened a new issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848


   # Bug Report
   InAppBrowser Is Undefined During App Runtime
   ## Problem
   Attempting to call the InAppBrowser.open() method results in a TypeError: Cannot read property 'open' of undefined. No recent code changes to this code segment have occurred (it worked as expected on earlier builds), and the call is wrapped inside a platform.ready() call.
   ### What is expected to happen?
   The InAppBrowser.open() call should open an in app browser, prompting the user to log in.
   
   
   ### What does actually happen?
   The InAppBrowser is undefined during execution, resulting in a TypeError that causes an indefinite spinner wheel on the start page of the application.
   
   
   ## Information
   This was encountered upon switching from Nevercode to Codemagic and attempting to run a new build in Codemagic. The underlying code segment that is now throwing a TypeError has not changed.
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   window.cordova.InAppBrowser.open( ... )
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   We are experiencing this issue on Android platform version 8.0.0, using an Android device.
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   Cordova version 9.0.0, Android platform version 8.0.0, and Node version 10.0.0.
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ x ] I searched for existing GitHub issues
   - [   ] I updated all Cordova tooling to most recent version
   - [ x ] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] png995 commented on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
png995 commented on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-979812068


   Make sure that your config.xml contains the plugin info 
   <plugin name="cordova-plugin-inappbrowser" spec="version" />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] breautek commented on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-778532999


   > and the call is wrapped inside a platform.ready() call.
   
   Does this call waits for the [deviceready](https://cordova.apache.org/docs/en/10.x/cordova/events/events.html#deviceready) event that gets fired on the document?
   
   What version of this plugin are you using? (`cordova plugin ls` should tell you)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] png995 edited a comment on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
png995 edited a comment on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-979812068


   Make sure that your config.xml contains the plugin info 'plugin name="cordova-plugin-inappbrowser" spec="version"'
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] breautek commented on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-779944008


   I'm unable to reproduce this on `cordova@10` cli & `cordova-android@9`, testing `cordova-plugin-inappbrowser@5.0.1-dev` (from git master).
   
   Things to try:
   - Upgrading to `cordova-android@9`
   - Upgrading Cordova CLI to `cordova@10`
   
   Cordova doesn't support older versions, so if the issue only exists when using older versions they won't be addressed.
   
   If the issue still persists, then we will need to see if the issue persists when isolated from any frameworks you use. The best way to do this is by [creating a small reproduction app](https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md) that contains only what is necessary to reproduce the issue.
   
   If the issue cannot be demonstrated in an isolated environment, then this suggest you a plugin or some framework that is altering how Cordova behaves and a bug should be reported to the respective framework/plugin authors.
   
   Please do let me know your outcome.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] png995 edited a comment on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
png995 edited a comment on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-979812068


   Make sure that your config.xml contains the plugin info 
   plugin name="cordova-plugin-inappbrowser" spec="version"
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] anthonygacek commented on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
anthonygacek commented on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-779299041


   According to the platform.ready() call: 
   `Returns a promise when the platform is ready and native functionality can be called. If the app is running from within a web browser, then the promise will resolve when the DOM is ready. When the app is running from an application engine such as Cordova, then the promise will resolve when Cordova triggers the deviceready event.`
   Given that this error occurs when an .apk build of the project is launched on an Android device, I am under the impression this call is waiting for the deviceready event.
   
   I am using version 5.0.1-dev of the InAppBrowser plugin.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] png995 edited a comment on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
png995 edited a comment on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-979812068


   Make sure that your config.xml contains the plugin info 
                 <plugin name="cordova-plugin-inappbrowser" spec="version" />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] pjc0247 edited a comment on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
pjc0247 edited a comment on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-845620662


   I solved it by moving `<script src="cordova.js"></script>` to `<head>` instead of 'body'.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] png995 edited a comment on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
png995 edited a comment on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-979812068


   Make sure that your config.xml contains the plugin info '<plugin name="cordova-plugin-inappbrowser" spec="version" />'
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] pjc0247 commented on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
pjc0247 commented on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-845620662


   I solved it by moving `<script src="cordova.js"></script>` to `<head>` instead of '<body>'.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] jorhel commented on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
jorhel commented on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-785139466


   Cordova as update from the oficial plugin.
   [https://cordova.apache.org/announcements/2021/02/16/inappbrowser-release-5.0.0.html](https://cordova.apache.org/announcements/2021/02/16/inappbrowser-release-5.0.0.html)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] png995 edited a comment on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
png995 edited a comment on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-979812068


   Make sure that your config.xml contains the plugin info <plugin name="cordova-plugin-inappbrowser" spec="version" />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] anthonygacek commented on issue #848: InAppBrowser Is Undefined During App Runtime

Posted by GitBox <gi...@apache.org>.
anthonygacek commented on issue #848:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/848#issuecomment-779307579


   As a follow-up to the previous post, I added a `console.log('Platform ready from', readySource);` call within the `platform.ready()` block to verify that the application is running from the correct engine. This call returns a value of "cordova," thus verifying this is behaving as inspected.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org