Jump to content

Empty images in camera upload


Recommended Posts

Posted (edited)

Recently had the following problem:

 

Server: v. 4.3.1.0 on Ubuntu 18.04

Client: v. 3.0.97 on Android 10, Samsung A51

 

Camera upload is enabled to Emby Server and only on WiFi.

The device is named on the server and correctly identified, with the right directory structure created.

Files are uploaded, but are all empty - zero bytes on the server.

 

Following server log entry for each upload attempt:

 

2020-02-24 10:13:47.164 Error HttpServer: Error processing request
    *** Error Report ***
    Version: 4.3.1.0
    Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
    Operating system: Unix 4.15.0.88
    64-Bit OS: True
    64-Bit Process: True
    User Interactive: True
    Runtime: file:///opt/emby-server/system/System.Private.CoreLib.dll
    Processor count: 4
    Program data path: /var/lib/emby
    Application directory: /opt/emby-server/system
    System.Exception: System.Exception: Bad request
     at SocketHttpListener.Net.HttpRequestStream.EndRead(IAsyncResult asyncResult)
     at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
    --- End of stack trace from previous location where exception was thrown ---
     at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
     at Emby.Server.Implementations.Devices.DeviceManager.AcceptCameraUpload(String deviceId, Stream stream, LocalFileInfo file)
     at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)
     at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)
     at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)
    Source: SocketHttpListener
    TargetSite: Int32 EndRead(System.IAsyncResult)
    
2020-02-24 10:13:47.164 Info HttpServer: HTTP Response 500 to 192.168.0.102. Time: 29ms. http://192.168.0.12:8096/emby/Devices/CameraUploads?DeviceId=36b716caf1843850&Name=20200118_214545.mp4&Album=Camera Roll&Id=L3N0b3JhZ2UvZW11bGF0ZWQvMC9EQ0lNL0NhbWVyYS8yMDIwMDExOF8yMTQ1NDUubXA0MQ==

 

Any suggestions?

Edited by adwuk
Posted

Hi there, is this involving a reverse proxy?

Posted

Hi Luke - no reverse proxy involved. Just a direct connection with the server.

Posted

Ok I'm not sure yet why this is happening but we'll update the server to Make sure the zero byte files get deleted in this situation.

Posted

Looks like it is an Android v.10 issue.  My wife's phone is Android 9, same client version, same network configuration and same server, and the uploads all work fine.

Posted

I'm not so sure as I've been testing on android 10. It could be manufacturer related.

Posted

Ok - well the Android 9 device is Sony, and the Android 10 device is Samsung.

Posted

Recently had the following problem:

 

Server: v. 4.3.1.0 on Ubuntu 18.04

Client: v. 3.0.97 on Android 10, Samsung A51

 

Camera upload is enabled to Emby Server and only on WiFi.

The device is named on the server and correctly identified, with the right directory structure created.

Files are uploaded, but are all empty - zero bytes on the server.

 

Following server log entry for each upload attempt:

 

2020-02-24 10:13:47.164 Error HttpServer: Error processing request

*** Error Report ***

Version: 4.3.1.0

Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb

Operating system: Unix 4.15.0.88

64-Bit OS: True

64-Bit Process: True

User Interactive: True

Runtime: file:///opt/emby-server/system/System.Private.CoreLib.dll

Processor count: 4

Program data path: /var/lib/emby

Application directory: /opt/emby-server/system

System.Exception: System.Exception: Bad request

at SocketHttpListener.Net.HttpRequestStream.EndRead(IAsyncResult asyncResult)

at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)

--- End of stack trace from previous location where exception was thrown ---

at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)

at Emby.Server.Implementations.Devices.DeviceManager.AcceptCameraUpload(String deviceId, Stream stream, LocalFileInfo file)

at Emby.Server.Implementations.Services.ServiceController.GetTaskResult(Task task)

at Emby.Server.Implementations.Services.ServiceHandler.ProcessRequestAsync(HttpListenerHost appHost, IRequest httpReq, IResponse httpRes, RestPath restPath, String responseContentType, CancellationToken cancellationToken)

at Emby.Server.Implementations.HttpServer.HttpListenerHost.RequestHandler(IRequest httpReq, ReadOnlyMemory`1 urlString, ReadOnlyMemory`1 localPath, CancellationToken cancellationToken)

Source: SocketHttpListener

TargetSite: Int32 EndRead(System.IAsyncResult)

 

2020-02-24 10:13:47.164 Info HttpServer: HTTP Response 500 to 192.168.0.102. Time: 29ms. http://192.168.0.12:8096/emby/Devices/CameraUploads?DeviceId=36b716caf1843850&Name=20200118_214545.mp4&Album=Camera Roll&Id=L3N0b3JhZ2UvZW11bGF0ZWQvMC9EQ0lNL0NhbWVyYS8yMDIwMDExOF8yMTQ1NDUubXA0MQ==

 

Any suggestions?

On my android 10 huawei phot uploads work fine. On my wife's android 9 huawei (same model) it looks like everything works but the photos are empty. If I open the files with notepad you can see it is a log of post requests to the server, not the actual image. Do you get this also?

Posted

The next release of the server will at least cleanup the empty files in the event of a problem. Thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...