Firebase JavaScript SDK 3.1.0, now with more React Native

1,746 views
Skip to first unread message

Jacob Wenger

unread,
Jun 28, 2016, 6:49:07 PM6/28/16
to Firebase Google Group
Hey Firebasers,

Version 3.1.0 of the JavaScript SDK has just been released and it resolves some of the major problems developers have been running into. Here are the release notes:
  • Replace use of browser-specific APIs that were blocking use of React Native from the JavaScript SDK.
  • The Node.js SDK now supports unauthenticated access. If no service account is provided, Realtime Database access will be restricted just as any unauthenticated client would be. In this case, certain methods (like creating and verifying tokens) will throw an error.
Things should now work much more smoothly in React Native with almost full support of the JavaScript SDK's functionality. There are still a few known limitations:
  • React Native does not support the File and Blob types, so Firebase Storage uploads do not work in React Native. File downloads do work though.
  • "Headful" auth methods such as signInWithPopup(), signInWithRedirect(), linkWithPopup(), and linkWithRedirect() do not work in React Native (or Cordova, for that matter). You can still sign in or link with a federated provider by using signInWithCredential() with an OAuth token from your provider of choice.
The other major issue we've heard has been the lack of end-user authentication and user management methods in the 3.x.x Node.js and Java SDKs. Allowing unauthenticated access to the Node.js SDK unblocks some use cases, but there are still more we plan to support. We are actively working to bring this functionality back and hope to have them for you in an update in the near future.

Thanks to everyone for their patience and voicing their opinions and complaints on this Google Group and across our other support channels. If you run into any issues with the new SDK, please reach out.

Onwards,
Jacob

niztal

unread,
Jun 29, 2016, 11:01:56 AM6/29/16
to Firebase Google Group
Wowww great news thanks firebase,

Jacob, what about the offline persistence? Will it get supported with react native?

Thanks

Jacob Wenger

unread,
Jun 29, 2016, 11:40:18 AM6/29/16
to fireba...@googlegroups.com
Hey niztal,

You're very welcome!

The JavaScript SDK still does not offer offline persistence. That is a popular feature request and we realize the importance of that for environments like React Native. However, I don't have any updates or timelines on it at present. For the time being, you will have to manage this yourself using something like React Native's AsyncStorage or use a bridge / adapter to one of the native mobile SDKs (like yours).

Jacob


--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/0fe0451a-1a9e-4a92-84ea-4ad3640f8728%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eugene

unread,
Jun 29, 2016, 2:56:12 PM6/29/16
to Firebase Google Group
WOW this is awesome news!

Just wondering aloud, will the JavaScript SDK ( with React Native support ) 
support the remaining cool new functionalities such as Analytics, GCM and others ?

Cheers! 

Henry Mao

unread,
Jun 29, 2016, 7:27:54 PM6/29/16
to Firebase Google Group
I just tested out the new Firebase v3.1.0 with React Native and can't seem to get it to work. There are no errors, but when trying to set values on the database, it simply does not set the data on the server.

        Firebase.initializeApp(config);
        var db = Firebase.database();
        var searchDb = db.ref('users');
        searchDb.on('value', function (snapshot) {
            console.log(snapshot.val());
        });
        searchDb.set('John');

Kato Richardson

unread,
Jun 29, 2016, 7:30:10 PM6/29/16
to Firebase Google Group
Hi Henry,

Please create a separate thread to discuss your issue and link to this one if you think it's tangentially related. This is valuable for several reasons: it'll avoid confusion on what this topic is discussing, make sure your messages aren't missed, and provide better search results for others experiencing the same problem as you--making your efforts here beneficial to other developers in the community.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Jacob Wenger

unread,
Jun 29, 2016, 9:04:23 PM6/29/16
to fireba...@googlegroups.com
@Eugene - We'd definitely like to bring more Firebase products to the JavaScript SDK, but we have nothing to announce on that front right now. If you want to use those in your React Native app today, you'd have to use an adapter for React Native which bridges to our native mobile SDKs. There is no official library for this although there are some people in the community who have started to create them.

Chetstone

unread,
Jul 6, 2016, 5:27:53 PM7/6/16
to Firebase Google Group
Thanks to the Firebase team for getting this out relatively quickly. It shows that it was high priority.

I hadn't paid much attention to the new features of Firebase 3 before, but since this announcement I wondered what upgrading would get me, so I went and watched a bunch of Google I/O videos. Pretty good sales pitch. Analytics: Great! Crash reporting: Cool! Auth-UI: Nice! Remote config: Could be useful.

But as usual, the devil's in the details. Looking at the docs, almost none of these new features are available in the Web SDK!

As far as I can tell, the only new features available for web developers in general, and react native in particular are:

1. Some minor improvements in auth: email verification, and the ability to merge multiple signons to a user account.
2. Storage. But in react native, downloads only, which doesn't support the most common use case of users uploading profile photos or videos.

And this is at the cost of potentially significant effort in rewriting to the new APIs, and losing the useful statistics provided by the old console.

Am I missing something, or is this about the state of it?

Thanks

Chester

Jacob Wenger

unread,
Jul 6, 2016, 5:49:00 PM7/6/16
to fireba...@googlegroups.com
Hey Chester,

Yes, a lot of the new features are only for the mobile clients. For now! We plan to bring them to the web and welcome feedback on which ones are most important to you and your app(s).

A few other comments on your comments:

Storage. But in react native, downloads only, which doesn't support the most common use case of users uploading profile photos or videos.

Yes, this is true. But we plan to add support for uploads in React Native in the near future. We didn't want to block our React Native updates until this landed though which is why we still have that limitiation.

losing the useful statistics provided by the old console.

As mentioned in other threads, this should be coming back soon. We are making progress here and I'm very anxious to tell you when it finally lands in production.

We are still figuring out the best way to bring more Firebase features to React Native. Whether it's adding them to the JavaScript SDK or building native bridges with the mobile clients. I can't tell you which one we will pursue at this moment, but it's definitely on our radar. For now though, you should be able to safely upgrade from the 2.x.x SDKs without major regressions with regards to React Native.

Cheers,
Jacob

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

Jacob Wenger

unread,
Jul 6, 2016, 5:50:15 PM7/6/16
to Jacob Wenger, fireba...@googlegroups.com
Also, there is a blog post on our blog today which details the 3.1.0 JavaScript SDK release, although most of the info in the blog post is already in this thread.

Jacob

Shirley Charlin Lee

unread,
Jul 7, 2016, 11:18:14 AM7/7/16
to Firebase Google Group, ja...@firebase.com
Hi I am still not able to connect my react native project to firebase. Can I at least have a example tutorial? 

Jacob Wenger

unread,
Jul 7, 2016, 12:04:10 PM7/7/16
to Firebase Google Group, Shirley Charlin Lee
Hey Shirley,

Firebase should "just work" in a normal React Native app. You shouldn't have to do anything special to get the two of them to work together. We don't have an official React Native + Firebase tutorial, but David East (a Firebaser) has a React Native sample project on GitHub that has been upgraded to the latest Firebase SDK. You should be able to use that as a starting point.

Cheers,
Jacob

Chester Wood

unread,
Jul 7, 2016, 5:39:19 PM7/7/16
to fireba...@googlegroups.com
Jacob,

Thanks for the reply. I would think the first new feature would be Analytics, as it seems that it powers many of the other new features. 

I wonder if a hybrid approach is possible, using the current JS SDK for the features it already has, and adding react-native bridge code to provide the new features? After all, analytics needs access to lots of environmental information that is readily available in the Native SDK's but probably less so in the browser and almost nonexistent in react-native without bringing in third-party bridge libraries such as react-native-device-info. So why not implement most of it in native code in a bridge and provide access to needed controls in JS? It might be possible to leverage much of your existing native SDKs to do this.

all the best,
chester


You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/Uo8E7pJJ30U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Shirley Charlin Lee

unread,
Jul 14, 2016, 11:00:13 AM7/14/16
to Firebase Google Group, huil...@gmail.com
Hi! 

I am actually rushing on a project, so I have already fall back to firebase 2.4.2 and nowwwww the chrome debugger is prompting me that I have to use the latest firebase SDK... when I use createUser function... help?

Jacob Wenger

unread,
Jul 14, 2016, 11:31:31 AM7/14/16
to fireba...@googlegroups.com, Shirley Charlin Lee
Hey Shirley,

This is because projects created from console.firebase.google.com that use auth are required to use the 3.x.x SDKs. If you still have a legacy account from firebase.com, you can create a project there and use the 2.x.x SDKs with it.

Jacob

Reply all
Reply to author
Forward
0 new messages