-
Notifications
You must be signed in to change notification settings - Fork 7
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
Failure to connect diagnosis #231
Comments
you mean pop a dialog with this information? Sure, sounds like a good idea.
…On Fri, Jan 20, 2017 at 9:16 PM billmeek ***@***.***> wrote:
Assigned #231
<#231> to
@dmfrey <https://github.com/dmfrey>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#231 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA5yzIvGm5FpwnJsAwwAmKvLUPnF0U3xks5rUWpegaJpZM4Lp7Y1>
.
|
I found this for the device itself: There seems to be a ping in /system: I use nmap -p 6544 backendName to see if the port is I was think along the lines of a verbose description of any Please turn on your Wi-Fi on this device. or Unable to connect to the backend, see if it's running and/or IP/hostFromSettings:6544/Myth/GetHostName etc. |
that's a good idea. let's outline the scenarios. Does each warrant a
separate issue? I will probably have to come up with some more specific
exceptions to capture these cases, so that we can trigger the specific
messages in the UI.
…On Fri, Jan 20, 2017 at 9:50 PM billmeek ***@***.***> wrote:
I found this for the device itself:
https://developer.android.com/training/monitoring-device-state/connectivity-monitoring.html
There seems to be a ping in /system:
http://stackoverflow.com/questions/3905358/how-to-ping-external-ip-from-java-android
I use nmap -p 6544 backendName to see if the port is
even there (from the shell.)
I was think along the lines of a verbose description of any
failure, e.g.
Please turn on your Wi-Fi on this device.
or
Unable to connect to the backend, see if it's running and/or
check the backend logs. A simple test is to access the backend
Services API from a browser on this device. Try:
IP/hostFromSettings:6544/Myth/GetHostName
etc.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#231 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA5yzJ58TpejQ1dfrqyPRv4xYKdXiYeoks5rUXJsgaJpZM4Lp7Y1>
.
|
The app is already doing network connectivity checks. Take a look at this code. It is being done in a few places and I should really clean that up so there is only ever a single instance of this code. |
@billmeek I am not sure a ping is needed, so long as we react to connection failures appropriately. The SnackBar can contain an OnClickHandler. So maybe we make the network connection SnackBar contain a Troubleshoot link that lets us call all of these on one screen. So we could list the result of the ping on one line, along with the test name and a red or green dot to show if it passed or not. We could call the We could use this as a common place to display all these tests. |
Simple version of what follows:
Found ICMP on this page, may help: Things like firewalls/port filtering may be in the way. The address I really like the idea of a Troubleshoot link. Something like: if isThereInternetConnection() fails and Troubleshoot is |
The troubleshootter is accessible from the navigation drawer, from the menu when viewing a media item details, or from a snackbar whenever a connection issue is reported. Changes #231
@billmeek checkout the branch |
Looking good! Recording right now, so only tested the 1st 2, plus I |
@billmeek should we also add checks that we can parse recordings, upcoming recordings, encoders and videos? |
That could be good, not a connection problem, but a configuration one. One user had: LANG="en_US.ISO-8859-1" rather than en_US.UTF-8 There's another way to test LANG: http://mc0:6544/Myth/GetBackendInfo <BackendInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" serializerVersion="1.1">
<Build>
<Version>v29-pre-194-g2a1ccc0</Version>
<LibX264>true</LibX264>
<LibDNS_SD>true</LibDNS_SD>
</Build>
<Env>
<LANG>en_US.UTF-8</LANG>
<LCALL>en_US.UTF-8</LCALL>
<LCCTYPE>en_US.UTF-8</LCCTYPE>
<HOME>/home/mythtv</HOME>
<MYTHCONFDIR/>
</Env>
<Log>
<LogArgs>
--verbose general --logpath /var/log/mythtv --loglevel info --quiet
</LogArgs>
</Log>
</BackendInfo> I should retest that in 3.0.1. (recording right now, again.) |
MythTV uses UTF-8. It has previously been reported by users that they were having difficulting displaying the data and the result was their character encoding was not in UTF-8. This will help to diagnose this issue. Fixes #231
i should probably add a check in here for minimum mythtv version too. Thought? |
The version test makes sense to me. And it works with The text on the Troublesheeo Connection page that reads: |
Cool. Anything more with this. I was thinking about the tests to parse the json for recordings, upcoming, videos and encoders. We should be handling all the parsing errors with #68 so I don't think we will need to put that here. We should probably keep it to 1 screen. |
I like the existing screen, all the tests fit on a single Maybe all the text should just say what the test is |
Yes, that should be fine. Feel free to reword them. Keep them short enough to fit on one line. |
just got the updates. gonna merge this into |
I do have some changes to the text, but won't be able to get to |
ok, let me know when you get them in and I will merge the PR
…On Tue, Jan 24, 2017 at 12:55 PM billmeek ***@***.***> wrote:
I do have some changes to the text, but won't be able to get to
it 'til later today.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#231 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA5yzJEDjd7XgXbW42QKpiqBhn8eUOz6ks5rVjsAgaJpZM4Lp7Y1>
.
|
With troubleshooting, the app gets a fatal exception when it
Sent the above to my 0.27 backend (that's why the port above is 2744.) From LogCat when the app does it:
|
Can you post the JSON for GetBackendInfo from v0.27? I'm guessing it's a
mapping issue.
…On Tue, Jan 24, 2017, 9:07 PM billmeek ***@***.***> wrote:
With troubleshooting, the app gets a fatal exception when it
tries to use GetBackendInfo for a version that doesn't have
the GetBackendInfo endpoint (< 0.28.)
curl -H Accept:"application/json" mc4:2744/Myth/GetBackendInfo
<?xml version="1.0" encoding="utf-8"?><detail><errorCode>401</errorCode><errorDescription>Invalid Action</errorDescription></detail>
Sent the above to my 0.27 backend (that's why the port above is 2744.)
From LogCat when the app does it:
01-24 20:01:28.090 24202-24377/org.mythtv.android D/OkHttp: <-- 404 Not Found http://192.168.1.224:2744/Myth/GetBackendInfo (47ms)
01-24 20:01:28.090 24202-24377/org.mythtv.android D/OkHttp: Date: 25 Jan 2017 02:01:30
01-24 20:01:28.090 24202-24377/org.mythtv.android D/OkHttp: Server: Linux 4.4.0-31-generic, UPnP/1.0, MythTV 0.27.20151025-1
01-24 20:01:28.090 24202-24377/org.mythtv.android D/OkHttp: Accept-Ranges: bytes
01-24 20:01:28.090 24202-24377/org.mythtv.android D/OkHttp: Connection: Keep-Alive
01-24 20:01:28.091 24202-24377/org.mythtv.android D/OkHttp: Content-Type: text/html; charset="UTF-8"
01-24 20:01:28.091 24202-24377/org.mythtv.android D/OkHttp: <-- END HTTP
01-24 20:01:28.092 24202-24377/org.mythtv.android D/TroubleshootActivity: doInBackground : ***@***.***
01-24 20:01:28.101 24202-24377/org.mythtv.android E/UncaughtException: java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 8 path $
at com.google.gson.JsonParser.parse(JsonParser.java:65)
at org.mythtv.android.data.entity.mapper.BackendVersionJsonMapper.transformString(BackendVersionJsonMapper.java:50)
at org.mythtv.android.presentation.view.activity.phone.TroubleshootActivity$BackendVersionVerificationAsyncTask.doInBackground(TroubleshootActivity.java:503)
at org.mythtv.android.presentation.view.activity.phone.TroubleshootActivity$BackendVersionVerificationAsyncTask.doInBackground(TroubleshootActivity.java:485)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 8 path $
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559)
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1401)
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:542)
at com.google.gson.stream.JsonReader.peek(JsonReader.java:425)
at com.google.gson.JsonParser.parse(JsonParser.java:60)
at org.mythtv.android.data.entity.mapper.BackendVersionJsonMapper.transformString(BackendVersionJsonMapper.java:50)
at org.mythtv.android.presentation.view.activity.phone.TroubleshootActivity$BackendVersionVerificationAsyncTask.doInBackground(TroubleshootActivity.java:503)
at org.mythtv.android.presentation.view.activity.phone.TroubleshootActivity$BackendVersionVerificationAsyncTask.doInBackground(TroubleshootActivity.java:485)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
01-24 20:01:28.117 24202-24294/org.mythtv.android D/FA: Event not sent since app measurement is disabled
01-24 20:01:28.150 24202-24208/org.mythtv.android W/art: Suspending all threads took: 6.652ms
--------- beginning of crash
01-24 20:01:28.432 24202-24377/org.mythtv.android E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #5
Process: org.mythtv.android, PID: 24202
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 8 path $
at com.google.gson.JsonParser.parse(JsonParser.java:65)
at org.mythtv.android.data.entity.mapper.BackendVersionJsonMapper.transformString(BackendVersionJsonMapper.java:50)
at org.mythtv.android.presentation.view.activity.phone.TroubleshootActivity$BackendVersionVerificationAsyncTask.doInBackground(TroubleshootActivity.java:503)
at org.mythtv.android.presentation.view.activity.phone.TroubleshootActivity$BackendVersionVerificationAsyncTask.doInBackground(TroubleshootActivity.java:485)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 8 path $
at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559)
at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1401)
at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:542)
at com.google.gson.stream.JsonReader.peek(JsonReader.java:425)
at com.google.gson.JsonParser.parse(JsonParser.java:60)
at org.mythtv.android.data.entity.mapper.BackendVersionJsonMapper.transformString(BackendVersionJsonMapper.java:50)
at org.mythtv.android.presentation.view.activity.phone.TroubleshootActivity$BackendVersionVerificationAsyncTask.doInBackground(TroubleshootActivity.java:503)
at org.mythtv.android.presentation.view.activity.phone.TroubleshootActivity$BackendVersionVerificationAsyncTask.doInBackground(TroubleshootActivity.java:485)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#231 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA5yzNwXvo-slK9WAfm9W0T3B43Ol_l3ks5rVq51gaJpZM4Lp7Y1>
.
|
Unfortunately, it's an old MythTV issue. When the error fires, the response is |
@dmfrey, just pushed some new text. All remain on a |
Reopening to address where |
@dmfrey, I could open a new issue if you like. Rather than |
Na, after looking at the stacktrace you posted, it looks like all I needed was another exception handler. Can you test it again with the latest commit? |
That looks like the fix. Now the Troubleshooter correctly fails All of the tests have been tested. The last one was LANG="en_US.ISO-8859-1" Closing. |
* prepare for 2.0.3 * Bugfix/issue 122 (#133) * fixes #122 added back legacy attributes for older android sdk * fixes #128 * fixes #122 * Fixes #122 * fixes #135 (#136) * Update versions for release * Update screenshots for release * Update changelog for release * Update version for release * Update resources for release * german translation of 2.1.1 changelog (#183) * Fix search results on Android TV Search results were failing to render due to not having the appropriate leanback theme applied to the search results activity. Once reapplied, it was found that search results were not unique. Fixing how the search result db cleaned up the existing entries resolved this. The latest leanback support library was also applied, as was setting the search button color to the defined accent color. Also, a merge issue was identified which prevented search history from displaying and was resolved. fixes #184 * Prepare for release * Prepare for release * Prepare for release v2.2.1 * Update versions for release changes #210 * Update screenshots and changelog for release changes #210 * Update build options for release changes #210 * Prepare for release * Prepare for release * Refactor duplicate code to a common base class Changes #231 * Add Connection Troubleshooter The troubleshootter is accessible from the navigation drawer, from the menu when viewing a media item details, or from a snackbar whenever a connection issue is reported. Changes #231 * Add timing delays and animations to indicate progress Changes #68 * Add timing delays and animations to indicate progress Changes #231 * Add Backend Language Verification MythTV uses UTF-8. It has previously been reported by users that they were having difficulting displaying the data and the result was their character encoding was not in UTF-8. This will help to diagnose this issue. Fixes #231 * Add minimum mythtv version check Changes #231 * Update Airplane Mode text * Reword Troubleshooting text (again.) * Add JsonSyntexException handler for old versions of MythTV that do not have this url Fixes #231 * Add JsonSyntexException handler for old versions of MythTV that do not have this url Fixes #231
Comments (some nasty) of the app say that if the app
can't connect to the backend, there's no way to tell
what's wrong.
Would a solution be to check the individual parts of
the connection, e.g.
The text was updated successfully, but these errors were encountered: