Start a new topic

WikitudeTitaniumSample captureScreen Persmission Denied - Android

I am getting the below error while clicking the "Capture" button on any of the examples in the sample Android app.  I am using the latest version of the Wikitude SDK, The latest version of Titanium (5.1.1.201xxx), and a Samsung GS8 phone.  I have tried with a license key and without.  I have tried adding more permissions to the tiapp.xml file.  I would think that a sample app should literally import, build, then run.  Any help would be appreciated.  Thanks.


[ERROR] : TiExceptionHandler: (main) [2169,50892] /ui/windows/ARchitectWindow.js:155

[ERROR] : TiExceptionHandler: window.arview.captureScreen(includeWebView, null, { // "Path/In/Bundle/toImage.png"

[ERROR] : TiExceptionHandler: ^

[ERROR] : TiExceptionHandler: Error: Permission denied

[ERROR] : TiExceptionHandler: at Button.<anonymous> (/ui/windows/ARchitectWindow.js:155:23)

[ERROR] : TiExceptionHandler: at Button.value (ti:/events.js:49:21)

[ERROR] : TiExceptionHandler: at Button.value (ti:/events.js:101:19)

[ERROR] : TiExceptionHandler:

[ERROR] : TiExceptionHandler: java.io.UnixFileSystem.createFileExclusively0(Native Method)

[ERROR] : TiExceptionHandler: java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:281)

[ERROR] : TiExceptionHandler: java.io.File.createTempFile(File.java:2001)

[ERROR] : TiExceptionHandler: com.wikitude.ti.WikitudeViewProxy.captureScreen(WikitudeViewProxy.java:188)

[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)

[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63)

[ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:969)

[ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1194)

[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:394)

[ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:101)

[ERROR] : V8Exception: Exception occurred at /ui/windows/ARchitectWindow.js:155: Uncaught Error: Permission denied


Hi Josh,



I just tried what you described and could reproduce it. My apologies for the inconvenience. I'll forward this issue to our Android developer who will be happy to handle it when he's on site again.


I am confused about your Titanium SDK version though. The most recent Titanium SDK version seems to me to be 7.4.0.GA.



- Daniel


You are correct on the version Daniel.  It is 7.4.0.GA.  I was looking at the Titanium Studio version which is 5.1.1.201xxxx. Thanks for checking this out and I am looking forward to the resolution.


- Josh

Hi Josh,


thank you for reporting this issue. We could find the root cause of the issue which seems to be introduced with Titanium 7.3.0.GA. We created a bug report for the Appcelerator/Titanium team and are waiting for a reply/fix. 


Right now the only known workaround is to use Titanium SDK 7.2.0.GA when building the app.


Best Regards,

Alex

Hi,


I am facing the similar problem of 'CaptureScreen' and ruining the same code with the following setup, device and get the result as follow:


1. Ti.SDK 7.4.1 with Wikitude SDK 8.2.0 on Android Version 8.1.0 device (Oreo) ==> It does not work !!


2. Ti.SDK 7.4.1 with Wikitude SDK 8.2.0 on Android Version 5.0.0 device (Lollipop) ==? It WORKS fine!!


I guess it is something to do with the Android OS.


Regards,

TF


Hi,


The reason why it is working on Android 5.0.0 is because it does not need run-time permissions which were introduced with Android 6.0.


The Appcelerator/Titanium team was able to reproduce this issue. You can follow the progress on their issue tracker.


Best Regards,

Alex

Login or Signup to post a comment