NativeScript / NativeScript/firebase
[Firebase-storage][Android] Error: An unknown error occurred, please check the HTTP result code and inner exception for server response.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 62
- Forks
- 53
- Avg merge
- 8d 4h
- Merged PRs (30d)
- 2
Description
Error: An unknown error occurred, please check the HTTP result code and inner exception for server response.
const file = File.fromPath(files.files[0], true);
gives me
"_path": "/storage/emulated/0/Download/877981_QSG_SSB600-SOUNDBAR_ml.pdf",
"_name": "877981_QSG_SSB600-SOUNDBAR_ml.pdf",
"_extension": ".pdf"
Upload
firebase()
.storage()
.ref()
.child(remoteFullPath) // Firebase url
.putFile(localFullPath) // /storage/emulated/0/Download/877981_QSG_SSB600-SOUNDBAR_ml.pdf
.on('state_changed', {
complete() {
console.info('uploadFile', 'completed');
},
error(err) {
console.error('uploadFile', 'error', err);
},
next(snapshot) {
console.info('uploadFile', 'next', 'state', snapshot.state);
if (snapshot.totalBytes) {
console.log('uploadFile', 'next', 'progress %', snapshot.bytesTransferred / snapshot.totalBytes ?? 0 * 100);
}
if (snapshot.error) {
console.error('uploadFile', 'next', snapshot.error);
}
},
});
Any ideas?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The reported entry points are File.fromPath and Firebase Storage ref().child().putFile() on Android; first reproduce the PDF upload using the shown local path and inspect the HTTP result code and inner exception. Done means identifying a reproducible cause and confirming the upload succeeds, but the issue names no source file or test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, firebase, typescript
- Domain
- cloud, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100