Onsen 2 Template in Monaca giving error in Samsung galaxy S3 Monaca Debugger



  • Hi ,
    I am trying to migrate my project to Onsen 2 to get exciting new features.
    I started with ONSEN 2.0 quickstart .
    When I am opening this app in Monaca debugger in Iphone 6 , It works fine .
    But when I open this app in Debugger in Samsung Galaxy S3 it throws some error.

    Uncaught Error : Invalid State
    www/lib/onsenui/js/onsenui.js : 3222
    Uncaught TypeError : Cannot call method ‘lock’ of undefined.

    Does anybody faced a similar issue ?



  • Hi @anandpatwari31 !

    I think the version in that repo is slightly outdated. Can you try updating to 2.0.0-rc.2 which was released yesterday? This issue might already be resolved.

    If it’s still an issue in the latest version please open an issue here: https://github.com/OnsenUI/OnsenUI/issues

    We will be releasing a new website today with updated docs for Onsen UI 2.0, please stay tuned. :)



  • @anandpatwari31 An easy way to implement what @argelius stated was replace your JS lines with this:

    <link rel="stylesheet" href="https://cdn.rawgit.com/OnsenUI/OnsenUI-dist/2.0.0-rc.2/css/onsenui.css" type="text/css" media="all" />
    <link rel="stylesheet" href="https://cdn.rawgit.com/OnsenUI/OnsenUI-dist/2.0.0-rc.2/css/onsen-css-components.css">
    <script src="https://cdn.rawgit.com/OnsenUI/OnsenUI-dist/2.0.0-rc.2/js/onsenui.js"></script>
    <script src="components/loader.js"></script>
    

    Definitely not for production, but quick testing it works great! Credit to @Fran-Diox who showed this to me.



  • Thank you all . It has been resolved now. I used the new templates released by Monaca. Appreciate your response.


Log in to reply