Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON error #1

Open
Critical-Impact opened this issue Oct 28, 2015 · 3 comments
Open

JSON error #1

Critical-Impact opened this issue Oct 28, 2015 · 3 comments

Comments

@Critical-Impact
Copy link
Contributor

Hi, I'm trying to call this plugin and it's failing with the text "JSON error".
This is on android 5.1.1, using a freshly created project.
The code I attempt to run is
radaeePdf.open({
url: 'http://www.ncu.edu.tw/~ncu25352/Uploads/20131231103232738561744.pdf',
barColor: '#AEC7F5',
showClose: 'false',
title: 'PDF Test'
},
function(message){
console.log("evvai: " + message);
},
function(err){
console.log(err);
});
as per the demo. If you need any more information, let me know.

@PaoloMessina
Copy link
Owner

Hi!
yes, i work on that, only a JSON serialization error.

2015-10-28 16:38 GMT+01:00 Critical-Impact notifications@github.com:

Hi, I'm trying to call this plugin and it's failing with the text "JSON
error".
This is on android 5.1.1, using a freshly created project.
The code I attempt to run is
radaeePdf.open({
url: 'http://www.ncu.edu.tw/~ncu25352/Uploads/20131231103232738561744.pdf',

barColor: '#AEC7F5',
showClose: 'false',
title: 'PDF Test'
},
function(message){
console.log("evvai: " + message);
},
function(err){
console.log(err);
});
as per the demo. If you need any more information, let me know.


Reply to this email directly or view it on GitHub
#1.

@PaoloMessina
Copy link
Owner

I Fix it just now, try to remove, and add the plugin.

2015-10-28 17:08 GMT+01:00 Paolo Messina phemt.latd@gmail.com:

Hi!
yes, i work on that, only a JSON serialization error.

2015-10-28 16:38 GMT+01:00 Critical-Impact notifications@github.com:

Hi, I'm trying to call this plugin and it's failing with the text "JSON
error".
This is on android 5.1.1, using a freshly created project.
The code I attempt to run is
radaeePdf.open({
url: 'http://www.ncu.edu.tw/~ncu25352/Uploads/20131231103232738561744.pdf',

barColor: '#AEC7F5',
showClose: 'false',
title: 'PDF Test'
},
function(message){
console.log("evvai: " + message);
},
function(err){
console.log(err);
});
as per the demo. If you need any more information, let me know.


Reply to this email directly or view it on GitHub
#1.

@Critical-Impact
Copy link
Contributor Author

Hi, I altered the source code a bit to get more information from the stack trace.
The first issue is

org.json.JSONException: No value for headerParams
at org.json.JSONObject.get(JSONObject.java:389)
at org.json.JSONObject.getJSONObject(JSONObject.java:609)
at it.almaviva.cordovaplugins.RadaeePDF.execute(RadaeePDF.java:73)
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:95)
at org.apache.cordova.PluginManager.exec(PluginManager.java:130)
at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)

Basically, it appears to require a value for headerParams or it crashes.
That said, if I give it a value, it crashes the phone. I will look into this further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants