Does anyone get emailed crash reports from the client?


PHolder

Well-known member
May 19, 2018
1,145
187
I saw this

and it made me wonder whether or not the feedback report features of Android are sending crash reports anywhere?
 

kalaspuffar

Well-known member
May 19, 2018
296
105
Sweden
coderinsights.com
Hi @PHolder

Thank you for keeping an eye on this. It's a bit strange to crash here but I can see the actual crash in the play console.

It seems to be a new code to handle when you scan a login QR code URI that will redirect you to that URI. And if you click a link on a page it will open the app up the same way as this intent is meant to do. I don't know why it's crashing though, maybe the view of a URI intent is supposed to open a webpage and this phone might have a strange association to open a web browser. Maybe we could re-architect this in some better way?

What do you say @ahauser ?

The code in question in MainActivity is:

Code:
                final String serverData = new String(qrCodeData);
                Intent urlLoginIntent = new Intent(Intent.ACTION_VIEW);
                urlLoginIntent.setData(Uri.parse(serverData));
                urlLoginIntent.putExtra(LoginActivity.EXTRA_USE_CPS, false);
                if (ACTION_QUICK_SCAN.equals(getIntent().getAction())) urlLoginIntent.putExtra(LoginActivity.EXTRA_QUICK_SCAN, true);
                startActivity(urlLoginIntent);
Best regards
Daniel
 

ahauser

Well-known member
Feb 22, 2019
203
55
@kalaspuffar, without any further information about what exactly causes the crash, it's going to be tough. The code you posted above looks perfectly fine to me. Also, even if we were to make changes to it, we would never know if we have actually fixed anything at all. To be honest, I'd only want to investigate this further once we have a good bug report and can reproduce the issue.
 

PHolder

Well-known member
May 19, 2018
1,145
187
What is the crash? A NPE? If so, is it possible that
new Intent(Intent.ACTION_VIEW);
returns NULL?

Or maybe that
Uri.parse(serverData)
does?
 

kalaspuffar

Well-known member
May 19, 2018
296
105
Sweden
coderinsights.com
Code:
java.lang.RuntimeException:
  at android.app.ActivityThread.deliverResults (ActivityThread.java:5078)
  at android.app.ActivityThread.handleSendResult (ActivityThread.java:5120)
  at android.app.servertransaction.ActivityResultItem.execute (ActivityResultItem.java:49)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:108)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:68)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2199)
  at android.os.Handler.dispatchMessage (Handler.java:112)
  at android.os.Looper.loop (Looper.java:216)
  at android.app.ActivityThread.main (ActivityThread.java:7625)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:524)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:987)

Caused by: android.content.ActivityNotFoundException:
  at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:2114)
  at android.app.Instrumentation.execStartActivity (Instrumentation.java:1757)
  at android.app.Activity.startActivityForResult (Activity.java:4803)
  at android.support.v4.app.FragmentActivity.startActivityForResult (FragmentActivity.java:767)
  at android.app.Activity.startActivityForResult (Activity.java:4743)
  at android.support.v4.app.FragmentActivity.startActivityForResult (FragmentActivity.java:754)
  at android.app.Activity.startActivity (Activity.java:5164)
  at android.app.Activity.startActivity (Activity.java:5132)
  at org.ea.sqrl.activites.MainActivity.onActivityResult (MainActivity.java:124)
  at android.app.Activity.dispatchActivityResult (Activity.java:7797)
  at android.app.ActivityThread.deliverResults (ActivityThread.java:5071)