FirebaseInstanceId.Instance.Token returns null - xamarin.android

I have created a Xamarin.Android application targeting Oreo 8.1. I integrated Firebase notifications in my application. It was working fine till now but since last week I am getting strange error where var token = FirebaseInstanceId.Instance.Token; returns null. Also my FirebaseInstanceIdService does not get invoke when my app is installed for the first time on user's device.
I have tried several solutions including firebaseinstanceidservice-gettoken-returning-null
I tried to clean my solution several times even deleted bin and obj folders but still no use. I even tried to create new Firebase console app's google-services.json file but still receiving the same problem.
I will really appreciate your help. Thanks

Related

Firebase Add iOS App Error - There was an unknown error while processing the request. Try again

I'm trying to add a new iOS app in my project on Firebase console and I'm getting this generic error.
There was an unknown error while processing the request. Try again.
I've tried to login again, didn't work. Also tried on several different browsers, didn't work too.
My project has just 23 apps and the same problem does not happens when I try to add a new Android App.
Are someone facing the same problem? What should I do?
This happened to me, I just signed out from Firebase/Google account and completely signed out of chrome and signed back in again. This worked.
The project was already created. So I just had to click on it, or you could try using another browser/device
If that won't work, try deleting some unused, preferably IOS, projects from the firebase console AND https://console.cloud.google.com/

Getting an error while registering new bundle id in firebase having multiple android apps and one iOS apps

While registering iOS app in Firebase having different bundle id in one project, getting error as shown in screenshot.
There was an unknown error while processing your request. Try again.
I tried fresh login, still facing same issue. I also tried different browser but getting same issue.
Suppose I am registering new android app in same project having different bundle id, it is not showing any error. Also 80+ android apps are registered in same project and one iOS app. I want to add another iOS app in same project.
I had the same situation and had only 2 projects so 'reaching out' wasn't the case. I've refreshed the page and the project was already set correctly with my bundle id.

PhoneGap and iOS 8: Failed to load local files ONLY after updating my app

I'm developing a PhoneGap application where the user is able to navigate some pages served by a server. When the user navigates to those pages, the app downloads all the files (HTML, CSS, JS, etc.) and store them in the iPad. This way, if the user tries to access those pages being offline, the local files are served.
This app worked fine in iOS 7. Yesterday I decided to update my iPad to iOS 8, and at first it seemed it worked: I can download the files, go offline and still navigate the pages using the local files. The only error I'm getting in the Console is:
[Error] Deprecated attempt to access property 'userAgent' on a non-Navigator object.
The problem comes when I update my app or use "phonegap local run ios" with the app installed. Whenever I do it, the app becomes unable to load the local files:
Failed to load resource: The requested URL was not found on this server.
file:///var/mobile/Containers/Data/Application/7A3590E8-C78A-4F45-B5B9-51FD0BAFE524/Library/files/pages/7/7a56ab3cfa56fbd1b9c4becbf5dca4a2.jpg
The files are there, I can read them using the File plugin, but the WebView is unable to load them. I'm referencing them like this:
<img src="file://localhost/var/mobile/Containers/Data/Application/7A3590E8-C78A-4F45-B5B9-51FD0BAFE524/Library/files/pages/7/7a56ab3cfa56fbd1b9c4becbf5dca4a2.jpg" >
I tried to use both Library and Compatibility as iosPersistentFileLocation, but the result is the same. I'm marking all the downloaded files as "don't backup" to prevent them being included in iCloud:
fileEntry.setMetadata(function(){}, function(){}, {"com.apple.MobileBackup": 1});
At first I thought this was caused by the known bug to load local files in iOS 8, but my app IS loading them, it just stops working after I update the app.
I have PhoneGap and all the plugins updated to the last version. I also tried using Cordova and the same happens.
Anybody knows how can I solve this or where should I report this bug?
Thank you!
I managed to solve it! I was using fileEntry.toURL to get the file URLs to use in my HTML. If I use
fileEntry.toInternalURL()
instead, it works fine.
With internal URL the URLs are like this:
cdvfile://localhost/persistent/pages/7/0b0cc746c5e90ee7fc94b2c15d37d43e.png
I ran into the same problem and I managed to solve it. In my case, my problem was that every time I update the app, the new app has a different id than the last one. For instance, the path for the older app was:
file:///var/mobile/Containers/Data/Application/7A3590E8-C78A-4F45-B5B9-51FD0BAFE524/Library/files/file.pdf
And new one:
file:///var/mobile/Containers/Data/Application/1BC5FS-7B3B-90E8-C7C8-1B7C1984C2A71/Library/files/file.pdf
So even though my pdf files were still on the application data storage, I was using the wrong path since the app created a new application id. I solved this by creating a new function that updates my path every time there is an update. I find the application id by using:
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFileSystemSuccess, fail);
function onFileSystemSuccess(fileSystem) {
//Do what you need here
}
The filesystem is an object contains the nativeURL inside the root.
Hope it helps!

Stale Requests on iOS simulator

I am getting stale requests for all my web-service calls when running on iOS simulator, however running on a device runs perfectly fine
I've compared the calls themselves using Charles, and they are getting made exactly the same
This is only happening in one particular computer, I've tried running on simulator on other PC's and they also run fine, using the exact same project settings, through an SVN checkout
I've tried deleting derived data in Xcode, doing a clean, reset content and settings, uninstalling/re-installing Xcode... even creating a new account on the PC and installing a fresh copy of Xcode there, but the problem persists..
Any ideas on what the problem could be?
Greatly appreciated
Really old, but it might help someone... I had manually changed the time on my computer, so the time that was sent in the request from the simulator being received by the server mismatched, causing these stale requests apparently... (re-checking set date and time automatically, fixed this issue)

Sqlite data gets cleared while using coredata

In my application I am using Coredata.At some particular scenario all the data's get cleared (Not sure if the db is getting deleted).I am trying to find the scenario for the past one week but I am not able to find the root cause.I am also using Crashlytics in my app,but didn’t get any crash report.I haven’t faced this issue in debug mode but few of the Beta testers reported this issue.
I am posting this to get some direction on the scenarios where Coredata behaves as mentioned above

Resources