Push fails to write from Android device
See original GitHub issueThis is my service that consumes the nativescript-plugin-firebase API (that’s what’s on the other side of the FIREBASE
token), and the push
inside addChild
resolves, but no data is written in firebase.
import {Injectable, Inject} from '@angular/core';
import {FIREBASE} from '../../../app/frameworks/core.framework/index'
@Injectable()
export class NSDatabaseService {
private database:any;
private onSync:Function;
private userID:string;
constructor(@Inject(FIREBASE) firebase:any) {
console.log('Constructing NSDatabaseService');
this.database = firebase;
this.database.init({
persist: true // Allow disk persistence. Default false.
}).then((instance:any) => {
console.log('firebase.init successful');
}, (error:any) => {
console.log('firebase.init error: ' + error);
});
}
sync(path: string, onValueReceived: Function):void {
this.onSync = (result:any) => onValueReceived(result.value);
this.database.addValueEventListener(this.onSync, path);
}
addChild(path:string, data:any, callback?:Function):void {
this.database.push(path, data).then(function (result:any) {
console.log('created key: ' + result.key);
if (callback) {
callback(result.key)
}
});
}
}
Note that it works on the iOS emulator.
Issue Analytics
- State:
- Created 7 years ago
- Comments:51 (22 by maintainers)
Top Results From Across the Web
Failed to push the item(s). in android - Stack Overflow
The first cause is that you have more than one device connected, be sure to have only the device were you going to...
Read more >[Q] How to push file - No space left error | XDA Forums
I am trying to push framework-res.apk file with ADB to my Galaxy S device but I get following error: C:\>adb push framework-res.apk /system/framework...
Read more >Adb push does not work - Android Enthusiasts Stack Exchange
I tried to solve it according to this page http://android-tricks.blogspot.com/2009/01/mount-filesystem-read-write.html but with no success.
Read more >Scrcpy v1.17 fails to push files to device · Issue #2011 - GitHub
An app I had been developing worked but suddenly stopped after the Android upgrade. Turned out more new things were added to the...
Read more >Git Push Crashes from IDE [124680708] - Issue Tracker - Google
After updating Android studio to version 3.6 we are facing this issue. Works fine in commandline. Invocation failed Unexpected Response from Server: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for all your help!
That’s hardly ignorant 😃
Let me update the demo app first so you can simply clone that.