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
My Tutorials - Completed tab won't load #579
Comments
Hello @heathermh Trying to replicate this issue, have you completed any video tutorials? |
Yes @byaruhaf I have completed some. Here’s what this info looks like on the RW web site: |
@byaruhaf The problem is coming from an old tutorial titled "iOS & Swift Learning Path Trailer 2019" with contentId = 775835. If I bypass that record, the completed list loads just fine. |
@heathermh yes I am able to replicate the issue just by completing the iOS & Swift Learning Path Trailer 2019. if you wait long enough you get the following page, which is wrong. |
Thanks for the bug report @heathermh, and thanks for confirming it @byaruhaf. Any idea what it is about that particular item of content that is problematic? It might be a data issue that I can fix in the backend... |
Hi @sammyd From what I can see is JSON is missing both categories and domains data, see the JSON response below. {
"data": {
"id": "775835",
"type": "contents",
"attributes": {
"uri": "rw://betamax/videos/2425",
"name": "iOS & Swift Learning Path Trailer 2019",
"description": "<p>The trailer for the iOS & Swift Learning Path 2019.</p>\n",
"released_at": "2019-01-17T00:00:00.000Z",
"free": true,
"difficulty": null,
"content_type": "screencast",
"duration": 60,
"popularity": 100647,
"technology_triple_string": "",
"contributor_string": "",
"ordinal": null,
"professional": false,
"description_plain_text": "The trailer for the iOS & Swift Learning Path 2019.\n",
"video_identifier": 2425,
"parent_name": null,
"accessible": true,
"card_artwork_url": null,
"body": ""
},
"relationships": {
"domains": {
"data": [
]
},
"child_contents": {
"meta": {
"count": 0
}
},
"progression": {
"data": {
"id": "253015195",
"type": "progressions"
}
},
"bookmark": {
"data": null
},
"groups": {
"data": [
]
},
"categories": {
"data": [
]
}
},
"links": {
"self": "http://api.raywenderlich.com/api/contents/775835-ios-swift-learning-path-trailer-2019",
"video_stream": "http://api.raywenderlich.com/api/videos/2425/stream",
"video_download": "http://api.raywenderlich.com/api/videos/2425/download"
}
},
"included": [
{
"id": "253015195",
"type": "progressions",
"attributes": {
"target": 60,
"progress": 60,
"finished": true,
"percent_complete": 100,
"created_at": "2021-05-27T04:06:18.358Z",
"updated_at": "2021-05-27T04:06:34.189Z"
},
"relationships": {
"content": {
"data": {
"id": "775835",
"type": "contents"
},
"links": {
"self": "http://api.raywenderlich.com/api/contents/775835"
}
}
},
"links": {
"self": "http://api.raywenderlich.com/api/progressions/253015195"
}
}
]
} |
I have added those pieces, and some other bits that were notably lacking. Let me know if this solves the problem. Thanks! |
Hi @sammyd The problem is fixed now. Just wondering should the code be updated to ignore the missing content summary and display the content list instead of throwing a DataCacheError |
@byaruhaf I'm not quite sure what you mean? |
@sammyd I was wondering should emitron be updated to ignore bad JSON data sent from the backend instead of throwing a DataCacheError. |
@byaruhaf My view is that we shouldn't try and handle server edge cases. That's a large rabbit hole that doesn't provide huge benefits for a lot of work. We should just show an error message |
I'm in agreement with @0xTim. Maybe there is some work to show errors rather than hanging? But let's not put any effort into trying to magically recover from them. |
Closing this as this particular issue is handled. Please feel free to open up an additional issue with changes to error display if you'd like. |
When user taps on My Tutorials and then the Completed tab up top, they get a never ending "Loading..." message.
Steps to reproduce
Expected behavior
I'd expect to see a list of my completed tutorials, or a message that says I haven't completed any.
Actual behavior
I get a "Loading..." message.
The error in xcode:
EVENT:: ["object": "CategoryRepository", "action": "Last Updated: 2021-05-25 22:24:32 +0000. No refresh required."]
["object": "CompletedRepository", "action": "Failed_repositoryLoad", "reason": "Unable to receive content summary update: failure(Emitron.DataCacheError.cacheMiss)"]
["reason": "Unable to receive content summary update: failure(Emitron.DataCacheError.cacheMiss)", "action": "Failed_repositoryLoad", "object": "CompletedRepository"]
["action": "Failed_repositoryLoad", "reason": "Unable to receive content summary update: failure(Emitron.DataCacheError.cacheMiss)", "object": "CompletedRepository"]
Environment
1.0.7 on iPhone 12pro (from app store), ios 14.5
Can also reproduce in the simulator for ios 14.5 on iPhone 11 and 12
The text was updated successfully, but these errors were encountered: