I'm having a very odd issue that I've never experienced before on any other device. Whenever I click on a link inside an app (eg. Reddit News, Flow for Reddit, Feedly, etc.), it tries to load the webpage inside the app itself instead of launching the browser (which is perfectly normal). But for some reason, most of the time, this ends up crashing the app altogether (there are very few exceptions that do not crash these apps). I've tried clearing out all of the various caches, reinstalling the apps, and disabling all sorts of things, but to no avail. Anybody have any clue as to what's going on?
I'm running CleanROM XE 2.0. Here is the crash log:
Exception class name: android.database.sqlite.SQLiteException
Source file: SQLiteConnection.java
Source class: android.database.sqlite.SQLiteConnection
Source method: nativePrepareStatement
Line number: -2
Somefix to default browser crashing guys
? Please
Related
Hey all,
This problem has been killing me for a few days, I've tried searching the web and so far I've come up with not much.
I've got a widget which uses a WebView to load a page from a URL and read the contents of the page. The reason for the WebView is that I need to emulate the browser in order to get the page to display the content, a HttpGet won't get it back (reliably).
None the less, at some point the WebView stops loading new content and appears to keep loading a cached page instead. In the code it appears to have gone to the web to get a new page but what is returned is old data.
Those with the Android 2.2 build get a new button for applications in the settings area which allows them to clear the App Data. Doing this blows away whatever cached data the WebView is using and it starts to work again.
So what I would like to do is programmatically blow this App Data away. Only problem is that I have no idea what data it is. I'm not explicitly make it anywhere in my app, the WebView control appears to be making it itself. Would anyone know what is going on here and how I can avoid it?
I've turned all caching off (in every way), it had no effect.
Code:
browser = new WebView(context);
browser.getSettings().setJavaScriptEnabled(true);
browser.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
browser.setDrawingCacheEnabled(false);
browser.clearCache(true);
browser.addJavascriptInterface(new MyJavaScriptInterface(), "HTMLOUT");
browser.setWebViewClient(new TelstraWebViewClient());
browser.loadUrl(URL);
Cheers
On the built-in internet "browser" application, when I go to an online auction website in New Zealand called "trademe" (www.trademe.co.nz), the page partially loads and then freezes.
Can anyone tell what the issue and/or if there's a fix for it? thanks
also once I load the trademe page the whole browser application freezes as well I have to close it through task manager for it to funtion properly again. I also tried every other web pages and they seem to load fine. Its the trademe website that freezes.
You should try setting plugins to 'Always On' and see if it works.If you can load any other webpages without any issue,its not a browser issue. I have used the build you are running myself,and the browser has not crashed on me once. If you still cant load that webpage, you should try loading it in Skyfire or Firefox. If that doesnt work, maybe that webpage just cannot be loaded on a mobile device.
I can not install apps in this rom... Don't know why.
Even I have clicked the unknown source in application
Anyone can help me. thanks a lot.
You did read the title and still clicked so I think you may need this little app
I wanted to see the Android device log convenient on my desktop browser without using USB cable and also be able to send APKs to the device to update my apps. Without root! App install of course needs confirmation on device.
Also a nice log view on the device is always helpful - I found aLogCat scrolling too slow to be usefull and it can not jump directly to errors.
For tests of my remotely running app MobileWebCam I also need the possibility to get logs saved even without internet connection - so SMS can be sent to the device to trigger logging. For other apps there is an intent to trigger logs if Remote LogCat is installed. And the standard feature is there, too: dump logs from time to time onto sdcard, http or others like email with the support of my other app AutoShare ...
Filtering the log is a little complicated right now but I found myself using the full log most of the time anyway ...
Find the apk is attached to this post or in Android Market.
Nice. I will try it when I get time. It seems very useful.
Ohh, for some time I've wanted something like this! Thank you _miha_!
Downloading now, will report a little bit later as my phone is currently in 'flashing' state!
Thanks _miha_! Working great on my LG Thrill 2.3.5. I would love to see it auto scroll on the pc browser side. Even without it, awesome app. Thanks again!
Wow this is work great already do a test from Browser & everything is Great
Nice
It does not work for me, because the browser URL shows up like this:
http://fe80::123:65ff:fe68:767a%wlan0:8080
Why is that?
I am using a SGS2 with CM9.
Also, the RemoteLogCat service is running all the time, even when the app is closed....
CRXed said:
http://fe80::123:65ff:fe68:767a%wlan0:8080
Why is that?
Click to expand...
Click to collapse
That is an IPv6 format address. I do not know why you have one - maybe CM9 uses v6 preferred?
Try to enter [ and ] around the numbers and ::s. Like:
http://[fe80::123:65ff:fe68:767a%wlan0]:8080
(see here: http://superuser.com/questions/242122/accessing-non-port80-web-server-using-ipv6)
You can disable webserver with the third setting (Enable - HTTP server enabled. Access using Browser...) - it is enabled default at the moment so users do not have to search it before trying the app.
I can't get it to work.
My phone has a normal IPv4 IP adres, 192.168.0.13
I tried
http://[fe80::123:65ff:fe68:767a%wlan0]:8080
http://[fe80::123:65ff:fe68:767a]:8080, because, what is %wlan ??
Anything else I can try?
Also, when disabling HTTP server and exiting the app with the back button, the logcat service is still alive.
version 1.04
CRXed said:
Anything else I can try?
Also, when disabling HTTP server and exiting the app with the back button, the logcat service is still alive.
Click to expand...
Click to collapse
Updated version 1.04 displays ipv4 adress only now. And does no longer let Android restart the service in case it is not enabled (thanks for making me aware of that)!
IPv4 is working now!
But when I disable the HTTP server, I still see a service running in the background.
Which service is this? I use SystemPanel to check.
Also, when opening the app for the first time, my entire phone get's very slow, because it is trying to retreive all logging info.
After clearing the log, everything is smooth again.
Also, when the log is very big, I get this:
Code:
W/dalvikvm(18755): threadid=21: thread exiting with uncaught exception (group=0x40a541f8)
E/AndroidRuntime(18755): FATAL EXCEPTION: Thread-333
E/AndroidRuntime(18755): java.lang.OutOfMemoryError
E/AndroidRuntime(18755): at java.lang.AbstractStringBuilder.enlargeBuffer(AbstractStringBuilder.java:94)
E/AndroidRuntime(18755): at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:145)
E/AndroidRuntime(18755): at java.lang.StringBuilder.append(StringBuilder.java:216)
E/AndroidRuntime(18755): at com.dngames.remotelogcat.a.a(HelloServer.java:85)
E/AndroidRuntime(18755): at com.dngames.remotelogcat.h.run(NanoHTTPD.java:424)
E/AndroidRuntime(18755): at java.lang.Thread.run(Thread.java:856)
W/ActivityManager( 1803): Force finishing activity com.dngames.remotelogcat/.RemoteLogCat
More info in my signature.
To stop the always running background service please disable in the settings and leave the app. This seems not to be obvious enough - so maybe I should add a button in the first menu?
After a long time a little update to version 1.08 ...
I stripped html from the browser logcat so it is no longer confused when apps log html tags. Also two error message crashes are fixed.
First of all I know that this title creates a lot of questions.
The problem is exactly what the title says.
While developing apps, you make mistakes (NullPointers etc)
They are thrown when the occur, normally.
Today, it's different, sometimes, when Android (Studio) feels like it wants to help me, it redirects the debugger to a class that is used to "crash" the app at an exception.
With the cool features of Android Studio, you are able to see the content of the strings during debugging. With that feature, I've been able to solve most of the problems.
But now, I ran into a problem that doesn't have the solution above.
When the app "crashes" the screen stays white, and nothing is outputted in any logcat.
All it says is
"D/AndroidRuntime: Shutting down VM"
Is this a bug in Android Studio or in Android?
Hello,
First of all make sure that you have the latest version of Android Studio.
When the app crashes is selected application above the logcat (there is a spinner which says you what app is being displayed, does it say 'com.yourpackagename'? or does it say 'No Application'?) If so I think there is a bug in Android Studio, I have faced it too several times. When your app crashes it force closes the app?
You can try these things:
Unplug your phone and plug it again and wait for a confirmation on the device's screen.
If the confirmation dialog is not showing up, while the device is connected via USB, go to the Settings and disable the USB debugging mod. Wait a few seconds and re-enable it. Wait for confirmation on the device. If still not shows. Close the Android Studio and repeat the above steps. Reopen the Android studio. Run your app, if still not getting logcat you can try getting it manually like this:
Go to the folder where adb is installed (Normally on Windows C:/Users/Username/Appdata/Android/sdk/platform-tools) via terminal with admin rights .
Run cmd.exe as admin, type:
cd ../../Users/Username/Appdata/Android/sdk/platform-tools (where Username is the username of your windows account.)
Type adb devices while your phone is connected via USB with debugging on
See if it says unauthorized, if not, you are good to proceed to the next step.
Type
adb logcat > mylogcat.txt
And quickly open your app to go to the app that causes the crash. Try to cause the bug. When the bug occurs press Ctrl+C
Now your logcat is in the mylogcat.txt within the same folder of adb.
If you need more help extracting the logcat via the above way (manually) let me know
Hmm, at the moment the crash occurs, the app freezes and stays white. Only the main thread though. I've checked the logcat in Android Studio, the app is my app, and the doesn't really matter. It shows nothing.
No logcat not even with the cmd option.
Could it be that my custom rom is causing difficulties?
Thanks,
Tim
Try to place breakpoints in every line on your code. Try step by step to run the app line by line and where the execution flow jumps some lines of code that it shouldn't or stucks at a line of code whithout going to the next lines of code that it should, there should be the problem.
Are you doing intense work on the main thread? I had experienced an issue where I was doing heavy work on a view's onTouchListener and because the touch events were bottlenecking, my UI stuck, and on logcats I didn't got any error, but got a warning that the thread is shutting down due to the fact that the onTouchListener was busy to handle the touch event.
The best option and the most reliable you have now is to debug your app line by line as mentioned above. If it does not help, try commenting lines of code where you think you may be doing intense work or inside listeners and see if your app still crashes. Then uncomment blocks of code and run again and again to see until it crashes again. In the last block of code that you uncommented should be the error.
That way you can limit your search on these lines of code.
If you could further provide any detail of what are you doing in the main thread or any sample code, I will be able to help you further
I do not think that it is related with the custom rom, otherwise logcats would have some errors of missing packages etc
Well, using breakpoints I was redirected to the piece of code that is used to output exceptions. I didn't had a breakpoint there so I don't know why it went that deep. I'm doing heavy for with the runtime.exec command.
I've discovered the exception that was thrown when I posted this question, and the exception wasn't printed anywhere so I don't know why this isn't working. I was getting the java.lang.NumberFormatException exception. This will cause the app to crash, right?
If not how do I 'enable' that?
Thanks
If you are catching that exception the app will not crash. (try catch block). It may crash when any variable from that try catch block had that Number format exception, but when referencing it from outside the try-catch block.
Numberformat exception is occured when trying to convert String to Integers or a Number, and the string does not match the Integer format. E.g. Integer.parseInt("4.3") will throw that exception.
To enable the crashing of the app during that exception, do not catch that exception (NumberFormatException). If you are catching Exception (it is a superclass of NumberFormatException and is more general, it includes this exception too) then again your app will not crash.
If you are catching any of these exceptions, your app will not crash (may crash inside the catch or outside the try catch block)
Exception
RuntimeException
IllegalArgumentException
NumberFormatException
Possibly, a string conversion to Integer or Long or Double or Float may be causing your problem The errors are "silenced" due to the try-catch block Are you printing the exceptions with e.printStrackTrace in the first line of the catch block? (e is the Exception caught)
Hmm, I'll take a look at my code so check if I used a try and catch block.
Thanks!
It was the fault of Google Analytics, I had exception reporting on and that was causing the app to freeze instead of crashing and showing the exception.
Thanks!!
When we download certain file types or URLs, there can be an association that causes a particular app to open. For example, I've set an association so that when I click on a link that mentions IMDB, the IMDB app opens rather than viewing in a browser. And certain programs can be associated with downloads too, so that when we click on the download link, that app will fire rather than the standard download action.
I had this working great with an app called SabNZBDPlus. When I would click on a link for a .nzb file, that app would kick off, and know how to handle that file. But recently, I reinstalled that program. Now, rather than firing the program - or asking me what I'd like to do - the file simply downloads like any other, and none of SabNZBDPlus automation takes place. I've tried clearing application defaults, reinstall, reboot, and so on but cannot seem to clear this.
What I'd like to do, is make Android once again ask me what to do when I click on such a link. I'm sure this can be resolved by factory reset, but that seems to be overkill.
Any ideas?