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

Classes from the extension should be prioritized over the app #432

Closed
6 tasks done
beer-psi opened this issue Feb 19, 2024 · 0 comments · Fixed by #433
Closed
6 tasks done

Classes from the extension should be prioritized over the app #432

beer-psi opened this issue Feb 19, 2024 · 0 comments · Fixed by #433
Labels
Bug Something isn't working

Comments

@beer-psi
Copy link
Contributor

beer-psi commented Feb 19, 2024

Steps to reproduce

  1. Create an extension that somehow uses SLF4J
  2. Call org.slf4j.Logger#debug(java.lang.String,java.lang.Object)

Expected behavior

No crying because the org.slf4j.Logger class used is from the extension.

Actual behavior

Cry because the org.slf4j.Logger class used is from the app (transitively pulled through junrar), which is stripped by R8 and lacks that method

Crash logs

java.lang.NoSuchMethodError: No interface method debug(Ljava/lang/String;Ljava/lang/Object;)V in class Lorg/slf4j/Logger; or its super classes (declaration of 'org.slf4j.Logger' appears in /data/app/~~Ad2emimvH2GHSm31xyRUeA==/app.mihon.debug-8PGSmCkOTY6ocjBRnMF9TQ==/base.apk!classes2.dex)
	at com.hierynomus.protocol.commons.socket.ProxySocketFactory.createSocket(ProxySocketFactory.java:86)
	at com.hierynomus.protocol.commons.socket.ProxySocketFactory.createSocket(ProxySocketFactory.java:63)
	at com.hierynomus.smbj.transport.tcp.direct.DirectTcpTransport.connect(DirectTcpTransport.java:95)
	at com.hierynomus.smbj.connection.Connection.connect(Connection.java:139)
	at com.hierynomus.smbj.SMBClient.getEstablishedOrConnect(SMBClient.java:96)
	at com.hierynomus.smbj.SMBClient.connect(SMBClient.java:83)
	at io.github.beerpsi.tachiyomi.extension.all.smbshare.SMBShare.connectToShare(SMBShare.kt:229)

Mihon version

Mihon Beta r6520

Android version

Android 14

Device

Google Pixel 7

Other details

Weirdly niche issue, yes. Can probably be fixed by using a child-first parent-last implementation of PathClassLoader.

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
  • I have written a short but informative title.
  • I have gone through the FAQ and troubleshooting guide.
  • I have updated the app to version 0.16.3.
  • I have updated all installed extensions.
  • I will fill out all of the requested information in this form.
@beer-psi beer-psi added the Bug Something isn't working label Feb 19, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant