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

Android starts uploading and then nothing #351

Open
zvitek opened this issue May 21, 2024 · 5 comments
Open

Android starts uploading and then nothing #351

zvitek opened this issue May 21, 2024 · 5 comments

Comments

@zvitek
Copy link

zvitek commented May 21, 2024

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);
});
@narychen
Copy link

narychen commented Jun 1, 2024

Same problem. It is ok on ios, but nothing happened on android. No error. No log. Just nothing.

@GunnarAK
Copy link

GunnarAK commented Jul 4, 2024

Did you try setting breakpoints to debug the issue?

@VBarzionov
Copy link

VBarzionov commented Jul 24, 2024

Have got same problem.

In my case It is fixed by adding this to your ProGuard configuration (proguard-rules.pro) :
-keep class net.gotev.uploadservice.** { *; }

It mentioned in README.md but not in title project page.

@aliyanlatif
Copy link

aliyanlatif commented Aug 29, 2024

@zvitek same problem, were you able to solve the issue?

@aliyanlatif
Copy link

i updated the build.gradle file of the react native background upload package with the following changes mentioned in the URL and it worked

f9a29c5

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

No branches or pull requests

5 participants