cozy / cozy-emails

Email Client for Cozy
GNU Affero General Public License v3.0
66 stars 41 forks source link

Account created with Import from Google are unusable #678

Open clochix opened 8 years ago

clochix commented 8 years ago

A user used the application Import From Google to setup a GMail account. When he goes to the Email application, he's blocked on Folder page of the account parameters : connection failed, so we didn't get the folder list, and are unable to edit the account parameters, because we can't leave the Folders tab, due to an error message : “No folder in this account, please create one”. The only available option is to drop the account.

Here are the server logs:

+0749 models:ramStore retrieveAccounts
+0018 models:ramStore addAccount
+0000 imap:pool undefined new pool Object#c693c7e454bb614a7fff86cfa70227c8
+0000 models:ramStore addAccount
+0001 imap:pool undefined new pool Object#fb176f800611079cbb8f184ad1f592ee
+0000 models:ramStore retrieveMailboxes
+0023 models:ramStore retrieveCounts
+0123 models:ramStore retrieveTotalCounts
+0009 process:application_startup initializeNewAccounts
+0001 imap:reporter constructor process mailbox-refresh-listf0fa7d76-67cb-4e83-b065-1ab729150833
+0000 imap:reporter run process mailbox-refresh-listf0fa7d76-67cb-4e83-b065-1ab729150833
+0001 models:account getBoxes
+0000 imap:pool c693c7e454bb614a7fff86cfa70227c8 makeConnection
^[[34mINFO^[[39m +0000 imap:oauth XOAUTH GENERATOR FOR GMAIL oauth2
+0001 imap:pool Attempting connection
+0000 imap:pool { user: 'xxx.yyyy@gmail.com',
  xoauth2: 'yyyyyyyyyyyyyyyyyyyyyyyyyyyy==',
  host: 'imap.gmail.com',
  port: 993,
  tls: true,
  tlsOptions: { rejectUnauthorized: false } }
+0296 imap:pool c693c7e454bb614a7fff86cfa70227c8 connection error on imap.gmail.com:993
+0000 imap:pool RAW ERROR { [Error: Invalid credentials (Failure)] textCode: 'AUTHENTICATIONFAILED', source: 'authentication' }
+0008 imap:pool c693c7e454bb614a7fff86cfa70227c8 makeConnection
+0001 imap:pool Attempting connection
+0000 imap:pool { user: 'xxx.yyyy@gmail.com',
  xoauth2: 'yyyyyyyyyyyyyyyyyyyyyyyyyyyy==',
  host: 'imap.gmail.com',
  port: 993,
  tls: true,
  tlsOptions: { rejectUnauthorized: false } }
+0263 imap:pool c693c7e454bb614a7fff86cfa70227c8 connection error on imap.gmail.com:993
+0000 imap:pool RAW ERROR { [Error: Invalid credentials (Failure)] textCode: 'AUTHENTICATIONFAILED', source: 'authentication' }
+0639 sockethandler handleNewClient VOt7YMlavoHA6nvWAAAA
+0204 sockethandler updateClientScope VOt7YMlavoHA6nvWAAAA { mailboxID: 'fb176f800611079cbb8f184ad1f5de66',
  before: '2015-07-08T04:33:40.000Z' }
+0103 sockethandler updateClientScope VOt7YMlavoHA6nvWAAAA { mailboxID: 'fb176f800611079cbb8f184ad1f5de66',
  before: '2015-07-08T04:33:40.000Z' }
step21 commented 8 years ago

Thanks. Btw, just fyi, importing calendar, contacts and photos worked. Also, I have two-factor authentication enabled, but afaik this shouldn't matter as you are using oauth