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

Unable to play videos (gray screen) due to HTTP auth #12057

Closed
1 of 3 tasks
C-Otto opened this issue Aug 26, 2024 · 9 comments
Closed
1 of 3 tasks

Unable to play videos (gray screen) due to HTTP auth #12057

C-Otto opened this issue Aug 26, 2024 · 9 comments

Comments

@C-Otto
Copy link
Contributor

C-Otto commented Aug 26, 2024

The bug

Whenever I try to play a video using the Android app, I just get a gray screen once the video file loads (which takes a second or so). This happens for all videos I tried, recorded using several different devices, over the span of several years (but imported and possibly converted just recently). The videos play just fine in the browser (Firefox, both desktop and mobile).

See log details below.

5359404146823913419

The OS that Immich Server is running on

Debian Stable

Version of Immich Server

v1.112.1

Version of Immich Mobile App

1.112.1 build.154

Platform with the issue

  • Server
  • Web
  • Mobile

Relevant log output

FlutterError - Catch all

Instance of 'FlutterErrorDetails'
Exception: PlatformException(VideoError, Video player had error f1.l: Source error, null,
null)
Library: widgets library
Context: Instance of 'ErrorDescription'

#1      AsyncError.value (package:riverpod/src/common.dart:494:0)                             
#2      VideoViewerPage.build (package:immich_mobile/pages/common/video_viewer.page.dart:36:0)
#3      _ConsumerState.build (package:flutter_riverpod/src/consumer.dart:476:0)               
#4      StatefulElement.build (package:flutter/src/widgets/framework.dart:5599:0)             
#5      ConsumerStatefulElement.build (package:flutter_riverpod/src/consumer.dart:539:0)      
#6      HookElement.build (package:flutter_hooks/src/framework.dart:438:0)                    
#7      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5487:0)   
#8      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5650:0)    
#9      Element.rebuild (package:flutter/src/widgets/framework.dart:5203:0)                   
#10     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2905:0)             
#11     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:1136:0)            
#12     RendererBinding._handlePersistentFrameCallback                                        
(package:flutter/src/rendering/binding.dart:443:0)                                            
#13     SchedulerBinding._invokeFrameCallback                                                 
(package:flutter/src/scheduler/binding.dart:1392:0)                                           
#14     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1313:0)  
#15     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1171:0) 
#16     _invoke (dart:ui/hooks.dart:312:0)                                                    
#17     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:419:0)                
#18     _drawFrame (dart:ui/hooks.dart:283:0)

Additional information

Android 14, Fairphone 5 5G

@alextran1502
Copy link
Contributor

Do you change the transcoding settings? And if possible, can you include a sample video?

@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 26, 2024

As far as I know, I didn't change anything video related. Sample: https://c-otto.de/VID_20240326_123259.mp4

@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 26, 2024

encodedVideoPath in the asset table is NULL, no idea if that's correct

@mmomjian
Copy link
Contributor

How are you connecting in the app? Are you using HTTPS with a self signed cert ?

@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 26, 2024

No, but I have a weird setup, let me try to explain :)

  1. Android app, nothing fancy here
  2. API url is https://username:password@somewhere/api
  3. SSL certificate at https://somewhere is generated via let's encrypt (and valid in all browsers I use without manual trickery)
  4. Apache at https://somewhere enforces standard HTTP auth
  5. Apache is a (also reverse) proxy for http://10.x.x.x:2283/ (including websocket support)

@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 26, 2024

Oh, somewhere resolves to both IPv4 and IPv6 (and both work)

@mmomjian
Copy link
Contributor

You should try connecting directly to 2283. This is probably because you use username:PW in URL, it’s a flutter bug. Can reopen if :2283 direct presents the same issue.

Duplicate: #5553

@mmomjian mmomjian closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2024
@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 26, 2024

Indeed, basic auth seems to be the issue:

2a0a:[...]- - [26/Aug/2024:19:05:51 +0200] "GET /api/assets/[...]/video/playback HTTP/1.1" 401 3317 "-" "ExoPlayer"

@C-Otto
Copy link
Contributor Author

C-Otto commented Aug 26, 2024

It works without the http auth requirement. Thanks!

@C-Otto C-Otto changed the title Unable to play videos in Android app, gray screen Unable to play videos (gray screen) due to HTTP auth Aug 26, 2024
@github-staff github-staff deleted a comment from Lxx-c Oct 23, 2024
@github-staff github-staff deleted a comment from Lxx-c Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@C-Otto @alextran1502 @mmomjian and others