Spurious 'login' message when navigating to /settings with an unverified account #3078
Comments
|
Ahha, I have tracked this down. This occurs with the following STR:
{
customizeSync: undefined,
declinedSyncEngines: undefined,
email: "set117@yahoo.com",
keyFetchToken: undefined,
sessionToken: "XXXXXX",
uid: "XXXXX",
unwrapBKey: undefined,
verified: false,
verifiedCanLinkAccount: false
}diff --git a/app/scripts/models/auth_brokers/fx-sync.js b/app/scripts/models/auth_brokers/fx-sync.js
index e444111..5b4cb48 100644
--- a/app/scripts/models/auth_brokers/fx-sync.js
+++ b/app/scripts/models/auth_brokers/fx-sync.js
@@ -187,7 +187,12 @@ define([
},
_notifyRelierOfLogin: function (account) {
- return this.send(this.getCommand('LOGIN'), this._getLoginData(account));
+ var loginData = this._getLoginData(account);
+
+ console.dir(loginData);
+ console.trace();
+
+ return this.send(this.getCommand('LOGIN'), loginData);
},
_getLoginData: function (account) { |
|
Proposed solution - if the browser has already been notified of the |
|
Another, simpler, proposed solution. Saving whether the relier has been notified of login is more challenging than I expected. A simpler workaround is to not send the |
|
Yet another solution, only send the |
If the user signs up but does not verify their account, then visit `/` or `/settings`, they are redirected to `/confirm` which attempts to notify the browser of login. Niether `unwrapBKey` and `keyFetchToken` are persisted to disk. If `/confirm` is shown in a tab other than the original tab, `notifyBrowserOfLogin` is called with an account without these fields. The browser can't do anything without this information, so don't actually send the message. fixes #3078
That doesn't work with "choose what to sync". Solution 2 it is. |
If the user signs up but does not verify their account, then visit `/` or `/settings`, they are redirected to `/confirm` which attempts to notify the browser of login. Neither `unwrapBKey` and `keyFetchToken` are persisted to disk. If `/confirm` is shown in a tab other than the original tab, `notifyBrowserOfLogin` is called with an account without these fields. The browser can't do anything without this information, so don't actually send the message. fixes #3078
|
On Fri, Oct 9, 2015 at 6:37 AM, Shane Tomlinson notifications@github.com
https://github.com/mozilla/firefox-ios/blob/abba4c52950f216bdee8b98bad04a930334e8afa/Client/Frontend/Settings/SettingsTableViewController.swift#L143 In fact, that check should be lifted into the FxA code -- but that can be |
If the user signs up but does not verify their account, then visit `/` or `/settings`, they are redirected to `/confirm` which attempts to notify the browser of login. Neither `unwrapBKey` and `keyFetchToken` are persisted to disk. If `/confirm` is shown in a tab other than the original tab, `notifyBrowserOfLogin` is called with an account without these fields. The browser can't do anything without this information, so don't actually send the message. fixes #3078
If the user signs up but does not verify their account, then visit `/` or `/settings`, they are redirected to `/confirm` which attempts to notify the browser of login. Neither `unwrapBKey` and `keyFetchToken` are persisted to disk. If `/confirm` is shown in a tab other than the original tab, `notifyBrowserOfLogin` is called with an account without these fields. The browser can't do anything without this information, so don't actually send the message. fixes #3078
If the user signs up but does not verify their account, then visit `/` or `/settings`, they are redirected to `/confirm` which attempts to notify the browser of login. Neither `unwrapBKey` and `keyFetchToken` are persisted to disk. If `/confirm` is shown in a tab other than the original tab, `notifyBrowserOfLogin` is called with an account without these fields. The browser can't do anything without this information, so don't actually send the message. fixes #3078
If the user signs up but does not verify their account, then visit `/` or `/settings`, they are redirected to `/confirm` which attempts to notify the browser of login. Neither `unwrapBKey` and `keyFetchToken` are persisted to disk. If `/confirm` is shown in a tab other than the original tab, `notifyBrowserOfLogin` is called with an account without these fields. The browser can't do anything without this information, so don't actually send the message. fixes #3078
I see a spurious WebChannel 'login' message when I load
accounts.firefox.com/settings?context=fx_fennec_v1&service=sync&entrypoint=preferences. The 'login' message is malformed; it doesn't include keys. Is this intended? Do clients just need to ignore it?I witnessed this while developing Firefox for iOS as well.
@shane-tomlinson can you comment or re-direct?
The log below also shows the 'login' message appearing before 'loaded', which is counter-intuitive. (Of course, there's no spec, per se.)
D GeckoFxAccounts(26989) FxAccountsWebChannel message received, command: fxaccounts:login
W GeckoAccounts(26989) Got exception updating Firefox Account from JSON; ignoring.
W GeckoAccounts(26989) org.mozilla.gecko.util.NativeJSObject$InvalidPropertyException: Property does not exist
W GeckoAccounts(26989) at org.mozilla.gecko.util.NativeJSObject.getString(Native Method)
W GeckoAccounts(26989) at org.mozilla.gecko.AccountsHelper.handleMessage(AccountsHelper.java:150)
W GeckoAccounts(26989) at org.mozilla.gecko.EventDispatcher.dispatchEvent(EventDispatcher.java:223)
W GeckoAccounts(26989) at org.mozilla.gecko.GeckoAppShell.handleGeckoMessage(GeckoAppShell.java:2275)
W GeckoAccounts(26989) at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
W GeckoAccounts(26989) at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:436)
E GeckoFxAccounts(26989) Could not update Firefox Account from JSON: org.mozilla.gecko.util.NativeJSObject$InvalidPropertyException: Property does not exist
D GeckoFxAccounts(26989) FxAccountsWebChannel message received, command: fxaccounts:loaded
D GeckoFxAccounts(26989) Got LOADED message!
The text was updated successfully, but these errors were encountered: