Firebase Hosting use latest deployment [duplicate] - firebase

This question already has an answer here:
Travis with Firebase deploy TypeError: this.stream.clearLine is not a function
(1 answer)
Closed 5 years ago.
I am using Github, Travis CI and Firebase hosting to test some CI features and get into that topic. Everything works so far, bust firebase never takes the latest deploy as hosting base.
http://imgur.com/pTOWdoa
Is there any way to tell firebase to always use the latest deploy? Right now I have to reroll that latest the get the second latest active.

It seems like travis-ci has an issue with the firebase deployment when it's not set to non-interactive.
Solution here

Related

Firebase Functions: Know the number of the new version deployed by Firebase CLI

When I use the firebase deploy command to deploy the functions, is there any way to find out the number of this latest version deployed? (and know what the current version is)?
Because to find this information on the web console (one by one) by entering each function, load the dashboard ... it consumes lots of time.
The reason for this question is: I deployed some functions yesterday. Another person uploaded older versions of the functions (without updating their git). Result? it became a mess and stopped everything!
It took me a while to discover that they implemented old versions of other functions :-{
So it would be quite simple: When executing the command for example: firebase deploy --only functions, the terminal itself could show:
functionA> (release 1)
functionB> (release 30)
#RenaudTarnec 's answer is correct. The other way that I see(not using the Firebase CLI) to get only the version number of deployed Cloud Function is adding K_REVISION environment variable in your code. The K_REVISION key is the version identifier of the function. This is the example on nodejs:
exports.helloWorld = (req, res) => {
const version = process.env.K_REVISION ;
console.log(`Running version ${version}`);
res.status(200).send(`Running version ${version}\n`)
};
when using curl it shows like this:
$ curl https://us-central1-projectname.cloudfunctions.net/helloWorld
Running version 5
The output returned five because I deployed this the function five times.
Preamble: This solution is not through the CLI. AFAIK it is not possible, through the CLI, to get the version of a deployed Cloud Function
You can find the deployed version on the Google Cloud Console, see below:
Do as follows:
Go to https://console.cloud.google.com/functions
(If necessary, switch to the desired project)
Open the "Function details" screen by clicking on the Function name
In the drop-down box you can see the Version number.

Firebase Crashlytics For Xamarin iOS- Missing dSYM files

Need Help !!
We are getting caution message on top of the Dashboard in Firebase Crashlytics. We are tried with different technical advises in different forums.
But nothing has worked out for us. We are still seeing the caution message at the top (in red strip) and crashes count is incrementing on every crash but doesn't come to Dashboard.
Here we go with our Firebase Crashlytics integration with project :
We are using Firebase Crashlytics with Xamarin Forms project to record any crashes in Mobile Application.
Since, Firebase Crashlytics SDK & Documentation are mostly on Native Platforms (Android & iOS). But, we still got provision to get packages from NuGet.
Here is the checklist which ensures we are on right direction:
1) Is App released with proper Apple Distribution Provision Profile and Certificate- YES
2) Is Distribution Provision Profile valid in terms expiration date - YES, it is valid till Next year from now.
3) Is GoogleService-Info.plist correctly placed. YES- it was downloaded from Crashlytics console with proper identifier configured. File was placed at root of iOS Project and set Build Action as BundleResource.
4) Did we call required initialisation function at proper place. - YES. Below set of codes ensures we initialised properly Firebase Crashlytics in AppDelegate.cs class.
5) Is your build configuration rightly placed in Release mode. YES
6) Important Point: Firebase Crashlytics was able to process the reported crashes with earlier version of iOS build which were having same project and package configuration and we could able to see the Crashes in readable format till for immediate previous versions.
But suddenly it stopped working when we promoted to production in AppStore (means LIVE in AppStore)
7) Have we uploaded to dSYM file manually to Firebase Crashlytics - YES we TRIED. We followed the steps to upload dSYM using XCode-SWIFT project with POD files.
Here is the setup and step.
POD was installed in appropriate XCode workspaces.
Run Script was executed with recommended POD commands.
Build was succeeded.
Hence, as you see, we are practiced with every advises whichever mentioned in any forum. We have applied, but we don't see, it is coming to Crashlytics Dashboard even then.
Try below command. May be help full.
msbuild "/Users/xxx/projects/myApp/myApp/myApp.iOS/myApp.iOS.csproj" /t:"build" /p:Configuration="AppStore" /p:Platform="iPhone" /p:BuildIpa=true /p:FirebaseCrashlyticsUploadSymbolsEnabled=true
I have tried this command and it is working in my case. I get it from this git thread : https://github.com/xamarin/GoogleApisForiOSComponents/issues/386

Firebase push notification - React Native: GULApplication.h file not found [duplicate]

This question already has answers here:
GoogleUtilities/AppDelegateSwizzler/Private/GULApplication.h' file > not found
(6 answers)
Closed 2 years ago.
I am running a project with React Native where I have used React Native Firebase Push Notification (react-native-firebase/messaging: "^7.1.8") and it was working till today.
But when I tried to install pod to create build today it started showing me this error when I try to run the project in xCode or via yarn.
/ios/Pods/Headers/Private/GoogleUtilities/GULAppDelegateSwizzler.h:19:9: 'GoogleUtilities/AppDelegateSwizzler/Private/GULApplication.h' file not found
How come this has happened, I am using
"#react-native-firebase/app": "^7.3.1",
"#react-native-firebase/messaging": "^7.1.8"
Any help is appreciated. Thank you.
Thank you for all answers,
It was an upstream error which made the latest version corrupted GoogleUtilities 6.7.0.
Updating pod after 19 hours of the post, It solved the problem.
Now the GoogleUtilities is 6.7.1.
Ref: https://github.com/invertase/react-native-firebase/issues/3938

Firebase functions samples do not work

Recently found out what is Firebase and started studying it. I need Firebase functions for the server side of my project so I was trying to see how they work but unsuccessfully.
They have nice "little" collection of functions examples there. I tried to start few of them like image-maker but none of them worked for me. Image maker shows me this errors while serving the local server for it:
! functions: Failed to load functions source code. Ensure that you
have the latest SDK by running npm i --save firebase-functions inside
the functions directory.
! functions: Error from emulator.
FirebaseError: Error parsing triggers: Cannot find module
'canvas-prebuilt'
I have no idea what are they talking about. I installed everything by Firebase tutorial through firebase init.
I have:
npm -v: 5.5.1
node --version: v8.9.1
I don't know how to check for Firebase version but I guess I have the latest one since I have just installed it. How can I fix this problem and actually try the functions? Can these functions samples be outdated? Where can I find the better ones?

Geofire and FirebaseUI with Upgraded Firebase

I use Geofire and FirebaseUI in my app.
In the documentation for how to upgrade to the new Firebase SDK, it says I need Geofire 1.2.x or beyond. However, this is not yet available in cocoapods. When will it be available?
Also, will I need to upgrade Firebase UI? How should I do that? It seems like a lot of the code for authentication is now outdated, so it would make sense that FirebaseUI would need to be upgraded.
Update
With FirebaseUI, I get this output in Terminal:
- `Firebase (~> 3.2)` required by `Podfile`
- `Firebase (~> 2.2)` required by `FirebaseUI (0.3.2)`
And with Geofire, I get this output in Terminal:
[!] Unable to satisfy the following requirements:
- `GeoFire (~> 1.2)` required by `Podfile`
You've got it spot on with Firebase update requirements for GeoFire, but for a "when"... well, as posted by David East of Firebase on GeoFire's github repo:
"Best estimate I can give you is that we will update GeoFire for iOS in the coming days to weeks. We've got a lot of open source libraries to update across a handful of languages, so it takes us time to make it all happen. Pull requests are always welcome if you want to give it a shot yourself!"
For now, if you're actively using GeoFire, I suggest just keeping Firebase at 2.5.1 and GeoFire at 1.1.3 and continue working until updates are pushed out. As for Firebase UI, it's different but documented here:
https://codelabs.developers.google.com/codelabs/firebase-ios-swift/index.html?index=..%2F..%2Findex#4
Hope this cleared things up. I was pretty frustrated with it as well.

Resources