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

DLNA doesn't work since 1de5177e #13

Closed
norohind opened this issue Apr 13, 2024 · 2 comments · Fixed by #16
Closed

DLNA doesn't work since 1de5177e #13

norohind opened this issue Apr 13, 2024 · 2 comments · Fixed by #16

Comments

@norohind
Copy link

norohind commented Apr 13, 2024

I was trying to build the app with cling's supported fork jupnp (see #10) when noticed that if you enable DLNA in Settings -> Casting it crashes even with cling, as it is now in edge. I bisected it down to 1de5177 being the one introduced the problem.

@norohind
Copy link
Author

Here's the backtrace.

FATAL EXCEPTION: main
Process: github.daneren2005.dsub, PID: 12997
java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/servlet/http/HttpServlet;
	at org.fourthline.cling.android.AndroidUpnpServiceConfiguration.createStreamServer(AndroidUpnpServiceConfiguration.java:110)
	at org.fourthline.cling.transport.RouterImpl.startAddressBasedTransports(RouterImpl.java:427)
	at org.fourthline.cling.transport.RouterImpl.enable(RouterImpl.java:132)
	at org.fourthline.cling.android.AndroidRouter.enable(AndroidRouter.java:91)
	at org.fourthline.cling.UpnpServiceImpl.<init>(UpnpServiceImpl.java:87)
	at org.fourthline.cling.android.AndroidUpnpServiceImpl$1.<init>(AndroidUpnpServiceImpl.java:54)
	at org.fourthline.cling.android.AndroidUpnpServiceImpl.onCreate(AndroidUpnpServiceImpl.java:54)
	at android.app.ActivityThread.handleCreateService(ActivityThread.java:4192)
	at android.app.ActivityThread.access$1500(ActivityThread.java:237)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
	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.lang.ClassNotFoundException: Didn't find class "javax.servlet.http.HttpServlet" on path: DexPathList[[zip file "/data/app/~~GRlDmVORaBcogPVOjiBiEA==/github.daneren2005.dsub-B8K7mv2UXcmGK8sNEK7Cyg==/base.apk", zip file "/data/app/~~GRlDmVORaBcogPVOjiBiEA==/github.daneren2005.dsub-B8K7mv2UXcmGK8sNEK7Cyg==/split_config.xxhdpi.apk"],nativeLibraryDirectories=[/data/app/~~GRlDmVORaBcogPVOjiBiEA==/github.daneren2005.dsub-B8K7mv2UXcmGK8sNEK7Cyg==/lib/x86, /system/lib, /system_ext/lib]]
	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
	at org.fourthline.cling.android.AndroidUpnpServiceConfiguration.createStreamServer(AndroidUpnpServiceConfiguration.java:110) 
	at org.fourthline.cling.transport.RouterImpl.startAddressBasedTransports(RouterImpl.java:427) 
	at org.fourthline.cling.transport.RouterImpl.enable(RouterImpl.java:132) 
	at org.fourthline.cling.android.AndroidRouter.enable(AndroidRouter.java:91) 
	at org.fourthline.cling.UpnpServiceImpl.<init>(UpnpServiceImpl.java:87) 
	at org.fourthline.cling.android.AndroidUpnpServiceImpl$1.<init>(AndroidUpnpServiceImpl.java:54) 
	at org.fourthline.cling.android.AndroidUpnpServiceImpl.onCreate(AndroidUpnpServiceImpl.java:54) 
	at android.app.ActivityThread.handleCreateService(ActivityThread.java:4192) 
	at android.app.ActivityThread.access$1500(ActivityThread.java:237) 
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932) 
	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) 
	Suppressed: java.io.IOException: No original dex files found for dex location (x86) /data/app/~~GRlDmVORaBcogPVOjiBiEA==/github.daneren2005.dsub-B8K7mv2UXcmGK8sNEK7Cyg==/split_config.xxhdpi.apk
		at dalvik.system.DexFile.openDexFileNative(Native Method)
		at dalvik.system.DexFile.openDexFile(DexFile.java:367)
		at dalvik.system.DexFile.<init>(DexFile.java:109)
		at dalvik.system.DexFile.<init>(DexFile.java:82)
		at dalvik.system.DexPathList.loadDexFile(DexPathList.java:439)
		at dalvik.system.DexPathList.makeDexElements(DexPathList.java:398)
		at dalvik.system.DexPathList.<init>(DexPathList.java:166)
		at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:129)
		at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:104)
		at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:74)
		at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:87)
		at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:116)
		at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:114)
		at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:60)
		at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:901)
		at android.app.LoadedApk.getClassLoader(LoadedApk.java:958)
		at android.app.LoadedApk.getResources(LoadedApk.java:1190)
		at android.app.ContextImpl.createAppContext(ContextImpl.java:2663)
		at android.app.ContextImpl.createAppContext(ContextImpl.java:2655)
		at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6595)
		at android.app.ActivityThread.access$1300(ActivityThread.java:237)
		at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
		... 6 more

@norohind
Copy link
Author

I found the fix: add implementation 'javax.servlet:javax.servlet-api:3.1.0' dependency. Going to test it out tomorrow, submit a PR and also see how it will go with migration to jupnp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant