-
Notifications
You must be signed in to change notification settings - Fork 27
Android: On start Alert syntax error .... ok // then grey screen #5
Comments
As a first step, move to a more recent build of couchbase lite android: I am going to remove the beta3rc10 artifacts, since a lot of people are grabbing these and they are out of date. (do you remember where you saw a link to these, so I can update that link?) |
@pellekrogholt sorry, completely ignore what I said. I see that those jars are referenced here: https://github.com/couchbaselabs/Couchbase-Lite-PhoneGap-Plugin/blob/master/plugin.xml and they should work. |
@jchris any idea why he would be getting this error?
|
@pellekrogholt are you seeing the output of this line anywhere in the logs? https://github.com/couchbaselabs/TodoLite-PhoneGap/blob/master/js/index.js#L541 Is it possible that somehow it's using a previous version of that javascript file? Did you update an existing project or start a brand new project? |
That is what will happen if the basic auth credentials aren't sent. The log line:
is partial b/c the console.log(a, b, c) only logs the first argument to the adb logcat, we aren't seeing the useful output that would help me know what's going on. There is a new Chrome remote debug tool that will give you deeper inspection and logging capabilities. Or alternatively, Once we have this output it should help us figure out what's going on. |
thx for your feedback and suggestions (I have to look into the Chrome remote debug thing looks niece thx) and sorry for the slow response - I was on a long weekend - but here it comes: updated repos - lets ensure we are on the same page:
lets build the cordova app cli:
lets looks at the logcat - there is probably some noize here forgive me for taht:
we get an alert screen "SyntaxError: Unexpected end of input" and click "OK"
makes sense - what to do ? |
Is that an unmodified index.js file or have you made modifications? |
I just tried the following:
Error message: http://cl.ly/image/2a3S3R3g0m3v Logs:
|
I verified that the commits that were supposed to make basic auth work are on the release branch: couchbase/couchbase-lite-java-listener@26dce8c |
Can reproduce on 4.2.2 in genymotion emulator. Cannot reproduce on 4.4.2 device or genymotion emulator. |
Another possibly relevant bug: https://code.google.com/p/android/issues/detail?id=57026 |
This looks like it also a related bug: https://code.google.com/p/android/issues/detail?id=10307 |
When I connected directly in safari running on android to 127.0.0.1:5984, it prompted me for a basic auth username and password. When I entered the value from the logs, it worked. TODO: compare the request received from the safari with the one from todolite phonegap by adding logging in the cblite listener. |
Running this raw XHR request before any other requests made it work:
|
but when looking at it again with chrome dev inspect enabled (still on master head: 6e6371a) - i get the following console errors:
whats up ? |
@pellekrogholt this ticket is getting unwieldy .. can you file a separate ticket for #5 (comment)? Include steps to reproduce and also any incorrect behavior you are seeing (if any) |
@tleyden with fresh eyes i tried to reproduce #5 (comment) - which i was not able to reproduce - sorry for the noize... so i'm not creating a new issue ... |
Can the ticket be closed then? |
I hit this same "Unexpected end of input" error just now with Genymotion emulating a Samsung Galaxy Nexus running Android 4.3 (chosen because that's my phone). Issuing the xhr get-before-put still resloves the issue, but that xhr is never getting fired because my userAgent apparently contains the term "Apple": Is there a more precise regex for the user-agent check that would work better? |
I am having this same issue with Galaxy S5 android 5.0. The following is the logical output
What am I missing here? |
pardon if it overlaps with #3 here it goes
log cat
versions
devices
lg nexus 4 / android 4.4
The text was updated successfully, but these errors were encountered: