Skip to content

Android starts uploading and then nothing #351

Open
@zvitek

Description

@zvitek

Hi, have you encountered similar behavior on Android?
I select a file to send for upload.
I get back the promise and the uploadId. But that's all. No event with process is called anymore.

The problem is only on the Android side.

For API level 30, the problem described above occurs.
For API level 34, the whole application crashes.

Thanks a lot!

react-native-background-upload: 6.6.0
react-native: 0.73.6

await new Promise((resolve, reject) => {
Upload.startUpload(options)
	.then((uploadId) => {
		console.log('Upload started', uploadId); // <-- called
		Upload.addListener('progress', uploadId, (data) => {
			setProgress(data.progress); // <-- no called
		});
		Upload.addListener('cancelled', uploadId, (data) => {
			reject(data); // <-- no called
		});
		Upload.addListener('error', uploadId, (data) => {
			reject(data.error); // <-- no called
		});
		Upload.addListener('completed', uploadId, (data) => {
			resolve(true); // <-- no called
		});
	})
	.catch(reject);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions