cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "puchen (JIRA)" <>
Subject [jira] [Commented] (CB-6368) FileReader readAsBinaryString can't work in Android.
Date Fri, 04 Apr 2014 03:07:14 GMT


puchen commented on CB-6368:

[~iclelland] Hello, There are some bugs in file autotest in spec.105 and spec.108 on Android
Because Android 2.3.7 can't support window.WebKitBlobBuilder, and js code "if (window.WebKitBlobBuilder)"
the window.WebKitBlobBuilder is 'undefined' in the spec.105. But codes also run in the if

> FileReader readAsBinaryString can't work in Android.
> ----------------------------------------------------
>                 Key: CB-6368
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>    Affects Versions: 3.4.0
>         Environment: Android 4.0.4
>            Reporter: puchen
>            Assignee: Ian Clelland
>             Fix For: 3.5.0
> Run spec test, at spec.86 of 'Run File Tests', got error message
> D/CordovaLog(7621): : Line 1 : Uncaught SyntaxError: Unexpected token ILLEGAL
> E/Web Console(7621): Uncaught SyntaxError: Unexpected token ILLEGAL at :1
> Only Android
> 1.Can't get the success callback. When cordova called 'public PluginResult(Status status,
byte[] data, boolean binaryString) ' method, the bytes encoded to string, and assigned to
'encodedMessage'. Then cordova sent the pluginResult, and called pluginResult.getMessage()
in encodeAsJsMessage method.So the problem appeared, the callback result is the String type
but can't be JSONObject.quote. Then cordova called callbackFromNative method in cordova.js,
the 'callback.success.apply' worked error, the Cordova Log showed 'Uncaught SyntaxError: Unexpected
token ILLEGAL'. The reason is 'readAsBinaryString' returned a binary string but can't be quoted,
caused the js layer syntax error.
> 2.If we can get the success callback, but the result is not expected in spec.86, because
'Base64.encodeToString' can't return the correct result in

This message was sent by Atlassian JIRA

View raw message