Parse iOS NSInternalInconsistencyException after User Logout and New User Login - ios

I'm using the Parse iOS SDK and sporadically getting the NSInternalInconsistencyException 'User cannot be saved unless they have been authenticated via logIn or signUp'. I've read a lot about this error, and it seems to come up when apps try to save a ref to another user on the iOS side (instead of Cloud Code) or when apps try to modify an unautheticated user. I am attempting to do neither of these -- I'm able to trigger it when trying to save a string property of the logged in user. As I mentioned, this error occurs sporadically, so it's very difficult to track down, but I wanted to see if anyone had any suggestions.
When I change my [currentUser saveInTheBackground] calls to the synchronous [currentUser save] I do not seem to see this error. And to reiterate, it only occurs after signing out with one user and signing in with another, but does not occur with any type of consistency. If the crash the app and reopen, I'm able to save for that user.
I've found a similar threads around the web referencing a similar issue:
Parse SDK on iOS: 'NSInternalInconsistencyException', reason: 'User cannot be saved unless they have been authenticated via logIn or signUp'
https://groups.google.com/forum/#!topic/parse-developers/UZ1ywdpUFVQ
I'm using the iOS SDK 1.6.5 (this error also popped up on 1.6.3) and have parse localDataStore enabled.
Any help/suggestions would be greatly appreciated! Also, not sure if this is the right place to post -- please let me know if not. I tried the Parse Google Group a few days ago, but have not received any responses and am don't know if it's a bug, so decided the FB bugs site was not a good place to post.

Related

"Incomplete registration" error using "Sign in with Apple"

I am attempting to submit a new iOS app to Apple that uses "Sign in with Apple" to authenticate users. In all my local testing, this works perfectly.
During Apple's review process, they ran into an error and provided this screenshot:
Unfortunately, the error message is in Chinese, but Google Translate say it means "Incomplete registration".
The weird thing about this is that the error message is in place of where there should be a button. Here is how the screen looks when I try it:
Does anyone know how to get into this state where there is an error instead of a button to continue with the sign-in process?
Is it possible that this is human-error on the part of the reviewer, and they for some reason don't have the Apple ID account setup correctly on the device?
I'm not sure if it is relevant, but I am using Firebase authentication to handle the sign-in process. It appears from the screenshot that this occurs before any requests are made to the backend though.
Update:
I found another question that has a similar error message in English. It may be related to my issue, but I have been unable to reproduce this error by using an incorrect Bundle ID as the accepted answer suggests. I just wanted to add this info, as it may have some relevance.
I don't currently have a physical iOS device to test on. Is it possible that this error is only displayed on real devices or only when using a signed .ipa?
Update - App was approved:
I resubmitted my app for review and it was approved, so it seems that human-error or some glitch in Apple's process caused it to be rejected initially. Although my problem is solved, I still have no idea how the reviewer managed to get into the state displayed in the screenshot.
The "Sign-Up Not Completed"/未完成註冊 may be caused by using + signs instead of encoded spaces (%20) in the URL when you redirect to https://appleid.apple.com/auth/authorize
Source: https://forums.developer.apple.com/thread/122458

My iOS app does not appear on Firebase dashboard

My app is live on the App Store and there are no crashes on the front end however when I log in to Firebase I cannot find it on the dashboard. I tried copy & pasting the database URL but I got the message saying that there was an error making the request and that I should try again later. Has anyone else encountered this issue and could advise me on who to contact to resolve it?
According to the Firebase Status Dashboard, there should be no issues with the Realtime Database at the moment.
Assuming that your app was associated with your Firebase account previously and just suddenly disappeared, I have not heard of/ encountered anything similar in the past.
One thing to try is to make sure you are logged into the correct account and have selected the correct project.
Since accessing the database directly through its URL says to try again later, this might be a temporary problem that is resolved shortly.
However to make sure, your best option at this point is probably to reach out to Firebase support directly using this form (requires sign-in).

Parse iOS Facebook Login when in production

I implemented Facebook login a while ago in my app, using the Parse tutorial:
https://parse.com/tutorials/integrating-facebook-in-ios
It seemed to be working just fine, and I released my application to the app store. I then changed, on my Parse dashboard, the app from regular to "Production", and I was wondering if this could cause my Facebook login to stop working.
The actual error message on the phone, which occurs after a user presses the Login button, then after hitting accept for the basic facebook permissions, it brings up an error message:
Could it be the production switch, or is there something else wrong here?
I think there are just two things that should cause this error. First and most possible one is the one you thought of it, so switching to the production. And the second could be some similar setting on facebook developer site. You shoould check there if the settings there are in production environment. I know I dont give you anything specific but I'll for problem there if I'll have the same problem.

Facebook Open Graph Share from iOS not working without hitting Open Graph Debugger first

I am trying to get Open Graph share actions to work on iOS. It's working some what, if I request the open graph url using the Open Graph Debugger first everything works as expected. However if I don't do this the preview in the share dialog is displayed for a seconds or so and then fades out. The post button is also disabled.
What I am seeing in the backend is that if I use the Open Graph Debugger or paste the object url into my own status I am getting requests from a Facebook server (69.171.234.117). However when I share directly from the application I am seeing a request from another Facebook server (173.252.74.115) this server doesn't seem to be able to read the Open Graph data correctly.
Has anyone seen anything like this before or know what's causing it?
EDIT: I've filed a bug with Facebook for this issue. Will updated here if it changes.
EDIT2: Facebook has confirmed this bug and is working on it. The suggested workaround for now is to trigger an initial scrape by using https://graph.facebook.com/?id={url}&scrape=true when the object is created.
EDIT3: Facebook closed the bug report and claimed the issue is solved in there latest SDK. I will verify this and report back.
EDIT4: This seems to be resolved now from my testing.
I encountered this issue before, it turns out that instances of custom open graph objects that are hosted on your server are instantiated only when they are related to for the first time.
Only when the first edge in the FB graph is assigned to your object is it that it obtains an Identifier and it exists in FB's records.
This first edge can only be created using the FB app or the open graph application.
After that's done you will be able to get a unique identifier for your object
GET https://graph.facebook.com/?ids=YOUR_OBJECT_URL
Then you could perform the share using the returned ID
Also see this SO post which supports my claim.

Suppressing Facebook SDK UIAlertView in iOS

I use the Facebook SDK for login in my App, I am on the newest version 3.2.1 and am having an issue with some of the errors the SDK throws. For example (and I know this is an outlier case) if a user logs into my app, then while that session is open removes my app from their facebook, then logs out/logs in on my app Facebook throws a UIAlertView that says com.facebook.sdk error 5, then if the user logs in again it works just fine by re-requesting permissions as it should.
While this is a weird use case, it speaks to the larger issue of not wanting Facebook to communicate with my users through jibberish AlertViews, I would much rather detect the error and throw a proper alert that a user can understand.
Is there anyway (without re-writing the SDK, and yes I have filed a bug) to suppress all UIAlertView's from Facebook SDK, and throw my own?
When following the login procedures described here: you have total control over the alerts. Facebook just passes you the error and you can chose what to display to the user, if anything.
Look at the Scrumptious sample app for an example.
If you have a specific case where the Scrumptious sample app throws an alert that you cannot control, please describe.

Resources