I am learning Firebase using angularjs. From this tutorial https://thinkster.io/tutorials/angularfire-realtime-slack-clone/creating-the-channels-sidebar, the code used to add a new chat room is like this
channels.$add(vm.newRoom).then(function (ref) {
However, when i run the application, this $add operation successfully add a new record in firebase table but it also causes the whole browser to freeze.
Angular version: 1.6.2
Firebase: 3.7.1
AngularFire: 2.1.0
It's a bug in Firebase 3.7.1. When I reverted to Firebase 3.7.0 my code works and my browsers don't freeze. I've reported the bug to Firebase.
This was recently fixed in Firebase 3.8.0. Recommend upgrading instead of reverting at this point!
Related
I am developing a mobile app with React native and trying to use firebase as a database. Yesterday I tried to upgrade my React native version from 0.37 to 0.40 but some files conflicted and my app didnt start. So I reverted to version 0.37. ( I copy pasted conflicted files with my earliest copies to solve this)
Now, when I copy paste firebase code snippet to my App.js file to setup firebase, I get an error "Cannot read property 'getItem' of undefined"
If I remove firebase snippet everything works fine. Otherwise after 1-2 seconds red screen pops up with the error on attachments.
I am suspecting, I broke something on the way to reverting react native 0.37. I tried to uninstall and reinstall firebase with no avail. Now I am beating my head and any help would be greatly appreaciated.
I found a solution to my problem. It seems that problem is not with firebase but its because of chrome debugger. Having the 'device toggle toolbar' (CMD SHIFT M) enabled in chrome seems to be causing the problem. De-selecting 'device toggle toolbar' and reloading the emulator gets rid of the error.
Check the image link for sample please.
Having issues with PouchDB 5.3.0. I am getting following error in my Ionic app
Error: Database location or iosDatabaseLocation value is now mandatory
in openDatabase call
The above error is because of below line of code:
> var websql = new PouchDB('websqlpouch', {adapter: 'websql'});
I am trying to use SQLite plugin in Ionic app.
The problem is already reported: https://github.com/pouchdb/pouchdb/issues/4979
You need to wait for a new version or use an older plugin version of sqlite-storage:
cordova plugin rm cordova-sqlite-storage
cordova plugin add cordova-sqlite-storage#0.7.14
Seems the issue was closed a year back.
I am on version 5.3.1 and I went ahead and used the location key and it works:
var db = new PouchDB('myDB', {adapter: 'websql', location:'default'});
As mentioned here, using the default value for the location key.
PouchDB: Version 5.3.1
Cordova-sqlite-storage: Version 1.2.0
https://github.com/litehelpers/cordova-sqlite-ext You can get the new plugin version of sqlite-storage in this link.
I cloned the following Polymer todo-list app from https://github.com/PolymerLabs/todo-list and after setting it up as per the instructions, i got it running on local with gulp serve. I could signin and add/delete/update todos as expected. However, a colleague of mine who did the same thing is getting the following error
My colleague is working from the Philippines if that matters at all. Could someone please advise how I can get it working on his local machine? We're both using Chrome btw and he does not run into any issues using a version that was deployed to firebase, just encountering the error on localhost. Thanks.
The issue was caused by the firebase element as explained here. Updating the firebase element solved the problem.
Google's gapi js library wants an onload function specified like this:
<script src="https://apis.google.com/js/client.js?onload=init"></script>
How do I interoperate this with ReactJS?
I tried using react-script-loader (https://github.com/yariv/ReactScriptLoader) which ran into some troubles because gapi doesn't yet exist when the script loader thinks it has completed returning it.
Don't know if you're still looking for this answer but I faced the same problem and the best option that I found was creating this package with all gapi script code, so now I just have to import it into my react app and I doesn't even have to wait the gapi script loaded from google apis link.
gapi-script package
I also created an example showing how you can use this package:
gapi-script example
after i updated my sample app to resteasy 3.0.8.FINAL the path can't be resolved. Before the update the app was running on resteasy 3.0.6.FINAL without any issues.
I'm using the solution with the ResteasyBootstrap listener. I checked the release notes for 3.0.7 / 3.0.8 but i couldn't find any big breaking change here.
on github you can find my sample app