Skip to content
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

[BUG] Deep links over shared files (oCIS) #4250

Open
3 of 11 tasks
jesmrec opened this issue Dec 11, 2023 · 5 comments · May be fixed by #4302
Open
3 of 11 tasks

[BUG] Deep links over shared files (oCIS) #4250

jesmrec opened this issue Dec 11, 2023 · 5 comments · May be fixed by #4302

Comments

@jesmrec
Copy link
Collaborator

jesmrec commented Dec 11, 2023

Comes from #4212 (comment)

Deep links over shared files are not implemented. It's causing a crash:

                                                                                                    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.owncloud.android/com.owncloud.android.ui.activity.FileDisplayActivity}: java.net.URISyntaxException: Illegal character in path at index 227: owncloud://ocis.ocis-wopi.latest.owncloud.works/f/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668%2142117dc5-c175-49a3-a683-4827bd3fe444:4374bf79-85db-4821-948e-4ca06a32726b:db2f83b4-0c8f-4c2e-8539-7b2
                                                                                                    11458f7d6
                                                                                                    	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
                                                                                                    	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
                                                                                                    	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    	at android.os.Looper.loop(Looper.java:223)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7656)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
                                                                                                    Caused by: java.net.URISyntaxException: Illegal character in path at index 227: owncloud://ocis.ocis-wopi.latest.owncloud.works/f/a0ca6a90-a365-4782-871e-d44447bbc668$a0ca6a90-a365-4782-871e-d44447bbc668%2142117dc5-c175-49a3-a683-4827bd3fe444:4374bf79-85db-4821-948e-4ca06a32726b:db2f83b4-0c8f-4c2e-8539-7b2
                                                                                                    11458f7d6
                                                                                                    	at java.net.URI$Parser.fail(URI.java:2893)
                                                                                                    	at java.net.URI$Parser.checkChars(URI.java:3066)
                                                                                                    	at java.net.URI$Parser.parseHierarchical(URI.java:3150)
                                                                                                    	at java.net.URI$Parser.parse(URI.java:3098)
                                                                                                    	at java.net.URI.<init>(URI.java:584)
                                                                                                    	at com.owncloud.android.presentation.files.operations.FileOperationsViewModel.handleDeepLink(FileOperationsViewModel.kt:145)
                                                                                                    	at com.owncloud.android.ui.activity.FileDisplayActivity.handleDeepLink(FileDisplayActivity.kt:1777)
                                                                                                    	at com.owncloud.android.ui.activity.FileDisplayActivity.onCreate(FileDisplayActivity.kt:193)
                                                                                                    	at android.app.Activity.performCreate(Activity.java:8000)
                                                                                                    	at android.app.Activity.performCreate(Activity.java:7984)
                                                                                                    	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
                                                                                                    	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)

apart of avoiding the crash, app should resolve the link using the meta endpoint (guessing that item is reachable) and show it as any other item in the Shares tab.

TASKS

  • Research (if needed)
  • Create branch fix/deep_links_for_shares
  • Development tasks
    • Discover root folder of the shares space in first account discovery
    • Check if deep link refers to a file in shares space
    • Move to "Shares" tab, navigate to the corresponding folder and open preview/details of the file
    • Add necessary tests
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch fix/deep_links_for_shares into master
@jesmrec jesmrec added Share with users p2-high Escalation, on top of current planning, release blocker labels Dec 11, 2023
@jesmrec jesmrec added this to the 4.2 - Current milestone Dec 11, 2023
@jesmrec
Copy link
Collaborator Author

jesmrec commented Dec 11, 2023

Crash in the top message happened because there was a blank in the link string. We could prevent this but it's not a problem in the links to shared items.

@JuancaG05 JuancaG05 self-assigned this Dec 18, 2023
@JuancaG05 JuancaG05 changed the title Deep links over shared files (oCIS) [BUG] Deep links over shared files (oCIS) Dec 18, 2023
@JuancaG05
Copy link
Collaborator

@JuancaG05
Copy link
Collaborator

Blocked again due to:

@jesmrec jesmrec removed the Sprint label Jan 19, 2024
@JuancaG05 JuancaG05 linked a pull request Jan 29, 2024 that will close this issue
1 task
@JuancaG05 JuancaG05 linked a pull request Jan 29, 2024 that will close this issue
1 task
@JuancaG05 JuancaG05 modified the milestones: 4.2 - Current, 4.3 - Future Feb 2, 2024
@jesmrec
Copy link
Collaborator Author

jesmrec commented Feb 16, 2024

Tracking: owncloud/ocis#8455

@JuancaG05 JuancaG05 modified the milestones: 4.3 - Current, 4.4 - Future May 3, 2024
@jesmrec
Copy link
Collaborator Author

jesmrec commented Oct 2, 2024

owncloud/ocis#8455 is fixed in rolling versions. Now, the <oc:id> is consistent for folders and subfolders.

@jesmrec jesmrec removed the p2-high Escalation, on top of current planning, release blocker label Oct 4, 2024
@jesmrec jesmrec modified the milestones: 4.4 - Current, Backlog Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants