[TIMOB-20563] Base64encode doesn't work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 5.2.0 |
Fix Version/s | n/a |
Components | n/a |
Labels | Camera, iOS |
Reporter | Arildo Junior |
Assignee | Unknown |
Created | 2016-02-24T21:46:05.000+0000 |
Updated | 2018-02-28T19:55:27.000+0000 |
Description
Just take a picture and try to base64encode the media result.
In console I have this logs after waiting about 2 minutes to process the base64encode:
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
[INFO] : Communications error: <OS_xpc_error: <error: 0x39e8f654> { count = 1, contents =
[INFO] : "XPCErrorDescription" => <string: 0x39e8f854> { length = 22, contents = "Connection interrupted" }
[INFO] : }>
[INFO] : Received memory warning.
[INFO] : Received memory warning.
[INFO] : LaunchServices: disconnect event received for service com.apple.lsd.mapdb
[INFO] : Received memory warning.
[INFO] : *** ASL MESSAGE SIZE (13857279 bytes) EXCEEDED MAXIMIMUM SIZE (2048000 bytes) ***
Example below:
Titanium.Media.showCamera({
success:function(event) {
Ti.Utils.base64encode(event.media);
// AFTER 2 MINUTES YOU WILL SEE THOSE MESSAGES ABOVE
},
cancel:function() {
},
error:function(error) {
// create alert
var a = Titanium.UI.createAlertDialog({title:'Camera'});
// set message
if (error.code == Titanium.Media.NO_CAMERA) {
a.setMessage('Device does not have video recording capabilities');
} else {
a.setMessage('Unexpected error: ' + error.code);
}
// show alert
a.show();
},
allowEditing:true
});
Attachments
File | Date | Size |
---|---|---|
log.log | 2016-02-24T21:39:39.000+0000 | 5169182 |
Related Stack Overflow question: http://stackoverflow.com/questions/35233932/unable-to-make-an-image-blob-json-serializable/35381676 [~arildo] could you check with some older SDKs as well, and also 5.2.0?
Also didn't work unfortunately.
I am not able to reproduce this issue. The following code line gives a log message but the camera app is not stuck.
The only error log that I get is :
*Environment*: *Device info:* Nexux7 (android 6.0.1) *Node.js Version:* 0.12.7 *npm Version:* 2.11.3 *Titanium SDKs:* 5.2.0 and 5.1.2.GA *Java Development Kit Version:* 1.8.0_73 *Titanium CLI Version:* 5.0.5
In my case the camera app is not able to generate a base64 string from event.media Blob. Were you be able to generate this base64string? Did you print out on your console Nazmus? I didn't test on Android devices but I will in the future. This issue must be fixed on both platforms.