Start a new topic

Unsexpected crash or image not recognized with wikitude plugin for cordova

Hi, I have a Cordova android app with the SDK for AR recognization and I am experiencing unexpected app crash. 

I'm currently using Cordova CLI v9.0.0

cordova-android 7.1.4

cordova-plugin-compat 1.2.0 "Compat"

cordova-plugin-device 2.0.2 "Device"

cordova-plugin-file 6.0.1 "File"

cordova-plugin-file-opener2 2.2.0 "File Opener2"

cordova-plugin-file-transfer 1.7.1 "File Transfer"

cordova-plugin-geolocation 4.0.1 "Geolocation"

cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"

cordova-plugin-nativestorage 2.3.2 "NativeStorage"

cordova-plugin-navigationbar-color 0.0.8 "NavigationBar"

cordova-plugin-network-information 2.0.1 "Network Information"

cordova-plugin-screen-orientation 3.0.1 "Screen Orientation"

cordova-plugin-statusbar 2.4.2 "StatusBar"

cordova-plugin-whitelist 1.3.3 "Whitelist"

cordova-plugin-zip 3.1.0 "cordova-plugin-zip"

es6-promise-plugin 4.2.2 "Promise"

com.wikitude.phonegap.WikitudePlugin v 8.3.0

 

The problem seems to appear randomly and seems to fix itself after closing and cleaning the app cache. I have tested various cases and my finding are:

- uninstall app

- install app

- open app and enter the ar mode

- after the ar mode is loaded I scan an element and it is recognized correctely

- close the app without exiting the view

- reopen app

- after the ar mode is loaded I scan an element and it is recognized correctely

- close the app without exiting the view

- reopen app

- after the ar mode is loaded I scan an element and it is not recognized

- close the app without exiting the view

- reopen app

- after the ar mode is loaded I scan an element and it is recognized correctely

 

Other test follow for every time I open the app are:

- loading / scanning of element ok

- loading / scanning of element don't show anything (didn't find the image) but didn't go in crash. in this scenario i usually go back in the menu and restart the ar mode

- loading / scanning of element result in crash of the app. in this case the app remain opened in background, so i close and reopen it

As you can see the sequence of crash is random and I can't find a cause to this behavior.

 

Thanks in advance for the support in fixing this problem of mine.



Hi Francesco,


Could you please also provide the following details:

  • What device does this happen with (model details and OS version) - is this issue happening on a specific device or is it the same behaviour on different Android devices?
  • Is this happening with the sample app or in your own app? If it happens with your own app, does the sample app work on your device when you follow the exact same steps?
  • Could you please send us the crash log?
  • Is the issue also occuring if you use the latest SDK version?


Thx and greetings

Nicola

Hi Nicola,

thanks for the support.


The devices with which I have done testing are a Samsung Galaxy Tab S2 (mod. SM-T819) and a smartphone OnePlus7.

Following are screen of the system information specific for the tablet and the smartphone:

Tablet

image


Smartphone

image



The app runs with SDK PRO 3D (one time) bought on 14/06/2019 and are using the versione 8.3.


In the following message I'll send the log and testing with the sample app

Those are the logs

txt
txt

Hi,


I tried the Cordova SDK 8.3 sample app on different Android devices (Xiomi, Samsung, Nokia,...) and could not reproduce the issue with putting the app to the background and resuming (I assume that you refer to this pause / resume behaviour when you say 'close the app without exiting the view').


Also - from the log files there is no crash or any output regarding Wikitude visible --> could you please recheck and send the log for the crash indicating an issue with the Wikitude component.


If the issue also persists in the Wiktiude SDK sample app, please share a video showing the steps taken and clarify the pause / resume steps).


Thx and greetings

Nicola

Hi,

I'm trying to get the sample app running, but meanwhile I have some video that show the problem


CORRECT BEHAVIOR https://vimeo.com/468105147/376e7ed8f2

CRASH WHEN LOAD AR https://vimeo.com/468062092/d6e9b487d0

NOT RECOGNIZE https://vimeo.com/468062046/fcadfb9bfb

CRASH WHEN RECOGNIZE https://vimeo.com/468061994/509fcc5212


I can, if its of any help, upload the apk of the app

I have started the sample app like in the following screenshot, but now I don't know how its supposed to work, clicking the various submenu like 1.1 don't do anything, I need to insert a world url perhaps?

image


Hi, I would like a response on the information sended two days ago, in particular I would like to know your opinion on the four video that shown my app with the wikitude plugin at work in different situation of incorrect behaviors. I confirm the availability to provide the apk for your possible tests.

Regarding the sample app I would like some help because I don't have know how to set that up, the log for the actual app I'm blocked because I can't seem to get anything usefull.

Hi Francesco,


Regarding the sample app setup --> in the Cordova documentation we provide an extensive setup guide, that explains how you can build and install the sample app. Details can be found here:


https://www.wikitude.com/external/doc/documentation/latest/phonegap/setupguidecordovacli.html#setup-guide-cordova-cli


Here is also the link to all SDK versions, in case you need to download it again:


https://support.wikitude.com/support/discussions/topics/5000091233


I tried to reproduce the issue with the sample app, but couldn't. So as next step, please try to use your own .wtc file in the sample app (instructions on how to change this, can be found here: https://www.wikitude.com/external/doc/documentation/latest/phonegap/imagerecognition.html#image-on-target --> 'Recognize your own images'). 


Please also make sure that you have implemented the lifecycle events properly (
https://www.wikitude.com/external/doc/documentation/latest/phonegap/reference.html#managing-the-wikitude-sdk-lifecycle).


The .apk does not help us unfortunately, as we'd need to be able to debug the code. As the crash logs don't include any details about an issue related to Wikitude, could you please recheck if you have further logoutput which includes logs from the Wikitude SDK?


Thx and greetings

Nicola

Hi,

I'm trying to get the sample app to load the first option but I'm stuck at this point in index.js file


I have placed several alert to get the point in which the code "freeze" but I can't get why it get stuck

prepareArchitectWorld: function(architectWorld, successCallback) {

    alert(7); // Here enter

    app.wikitudePlugin.isDeviceSupported(function() {

        alert(8); // Don't enter

        app.wikitudePlugin.requestAccess(

            function() {

                successCallback();

            },

            function(error) {

                var openAppSettings = confirm(error.userDescription + '\nOpen App Settings?');

                if ( openAppSettings == true ) {

                    app.wikitudePlugin.openAppSettings();

                }

            },

            architectWorld.requiredFeatures);

    }, function(errorMessage) {

        alert(13);

        app.wikitudePlugin.showAlert(errorMessage);

    },

    architectWorld.requiredFeatures);

    // Don't get here, stop before

    alert(12);

}


For the loggin of my app, is there a logging method internal of the wikitude plugin because the only log i can get are the one i implement and they aren't helpful.

Correct me if I'm wrong but I only use the Cordova extension or am to use other as well?



Login or Signup to post a comment