Start a new topic

White Screen instead of AR View trying wikitude samples for cordova

I'm looking into developing a Geo AR App and therefore want to try out wikitude's instant tracking and Geo AR functionalities. I have setup cordova, added the wikitude plugin, built several of the sample folders for android and ran them on my Samsung S8.
The App launches on my phone but instead of the AR View I only see a white screen with some UI elements and the ADE "button" on the bottom right. I have manually configured all permission settings for the app including camera permission. I have tried out different settings in ADE but it doesn't seem to make much of a difference

The only errors I'm getting from the console are for example these, while the latter two appear when I touch anywhere on the white space on the screen:

architect.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
ade.js:1 Uncaught TypeError: AR.js.click.executePlatformClick is not a function
at Object.executeClick (ade.js:1)
at HTMLDocument.touchendEvent (ade.js:1)
ade.js:1 Uncaught TypeError: AR.js.click.executePlatformClick is not a function
at Object.executeClick (ade.js:1)
at HTMLDocument.touchendEvent (ade.js:1)

I have also tried the Unity Wikitude samples and with those the camera work perfectly fine, but because I'm interested in the sensor-based Geo AR, this is (at least currently) not an option.
I have also found the other github sample repo here #https://github.com/Wikitude/wikitude-cordova-plugin-samples but the command line doesn't seem to work on Windows, at least that's what someone from Wikitude responded in an github issue.

How can I get the samples work properly with cordova?


I'm working on Win10 with Wikitude version 8.0.0, Cordova 8.0.0, Samsung Galaxy S8 with Android Oreo 8.0


Good morning Victoria,



could you describe the sequence of steps with which you set up your Cordova app in detail?



- Daniel


Hi Daniel,


I have installed cordova and already built apps with other plugins that work well so it doesn't seem to be a problem with my cordova setup.


The steps for my wikitude cordova app setup are:

I have downloaded the Wikitude cordova plugin from github https://github.com/Wikitude/wikitude-cordova-plugin and added it manually with the command cordova plugin add <THE_LOCAL_PATH> because I couldn't add it directly with the github link.

I have downloaded the Wikitude SDK samples from github https://github.com/Wikitude/wikitude-sdk-samples and copied the ade.js file to my "www/js"-folder and set the path accordingly later on in the index.html and .js file and copied for example the content of the sample "05_InstantTracking_2_3dModelonPlane" to my "www"-folder.

I check if all referenced paths are correct and run the app with the command cordova run android on my Samsung S8 which is connected via USB.

I've also built an .apk-file with cordova build android and copied it to my smartphone, installed it and opened it but I have the same problem there although the app runs smoothly on my phone there is no camera view only the white screen as you can see in the attached picture. I have granted all permissions as you can see in the 2nd screenshot and I have also added a screenshot of a Wikitude Unity Sample that I have built where the Augmented Reality view works fine.


Thank you in advance and best regards.



Good morning Victoria,



I think this might be related to the GitHub sample repository. These samples have not been updated for quite a while. Would you mind downloading the regular JavaScript SDK package, taking the samples from that and trying to run your app again?



- Daniel



1 person likes this

Thank you very much Daniel for giving me the link to the current samples! Is there any setup guide? I'm a bit confused with all the folders in there which I need to include in my cordova project. On an other note if the github samples are outdated you might want to update your documentation, because I got the repository from there:

https://www.wikitude.com/external/doc/documentation/latest/phonegap/samples.html#samples-on-github


Best regards!

Good morning Victoria,



the app package contains all the samples of the GitHub repository in their most recent version in the <PACKAGE_ROOT>/Examples/SDKExamples/wikitude-sdk-samples/src/main/assets/samples directory. I'd like you to try one of these samples rather than the ones from GitHub. You can ignore the rest of the package, none of it is relevant for your Cordova application.



- Daniel


Login or Signup to post a comment