Open kao98 opened 9 years ago
Hi @kao98,
So, the fact that you get this error is a bug, that will be corrected in the next release (ref https://github.com/cozy/cozy-emails/commit/fc3f3feead21dbc16630e590a24a3653c7b610e8)
Regarding refreshing of non RFC4551 boxes, it should happen periodically in the background every 5 minutes ( from https://github.com/cozy/cozy-emails/blob/fdc7bbd77a2dc1f2b30ea8878b05ecd2e13d8a9b/server/models/account.coffee#L133-L139 ). If it doesnt, it's a bug.
Finally, the refresh route is called everytime the user open a box, that's why we dont want to do it for slow refreshes (which can take up to a few minutes). We could however had a ?refreshEvenIfSlow=true parameter and use it when the user explicitly reclick on the mailbox.
Ok. So yes, I guess the fast refresh shouldn't happen in the next release for my mailbox.
Unfortunately my mailbox isn't refreshed at all, never.
And for mailboxes that don't support fast refresh, maybe a "refresh" button could be more explicit for the user?
Here's more logs:
[Tue, 07 Jul 2015 12:10:02 GMT] - GET / - 200 - 77.948 ms - 4643
INFO +0250 controllers:activity Response at 206ms
Onload at 1978ms
Page loaded in 2252ms
[Tue, 07 Jul 2015 12:10:04 GMT] - POST /activity - 200 - 0.303 ms - 2
[Tue, 07 Jul 2015 12:10:04 GMT] - GET /mailbox/bb67b8eeca1d19e8a2ee8655b701043b - 304 - 16.838 ms - -
EROR +0001 errorhandler error handler called with BadRequest: Bad request : Cant refresh a non RFC4551 box
at module.exports.refresh (/usr/local/cozy/apps/emails/build/server/controllers/mailboxes.js:55:17)
at Layer.handle [as handle_request] (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/layer.js:82:5)
at next (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/route.js:110:13)
at /usr/local/cozy/apps/emails/build/server/controllers/accounts.js:26:12
at /usr/local/cozy/apps/emails/build/server/models/account.js:61:14
at /usr/local/cozy/apps/emails/node_modules/cozydb/lib/model.js:59:20
at /usr/local/cozy/apps/emails/node_modules/cozydb/lib/cozymodel.js:65:18
at parseBody (/usr/local/cozy/apps/emails/node_modules/cozydb/node_modules/request-json-light/main.js:74:10)
at IncomingMessage.<anonymous> (/usr/local/cozy/apps/emails/node_modules/cozydb/node_modules/request-json-light/main.js:99:14)
at IncomingMessage.emit (events.js:117:20)
[Tue, 07 Jul 2015 12:10:08 GMT] - GET /refresh/bb67b8eeca1d19e8a2ee8655b701043b - 400 - 11.526 ms - -
EROR +0056 controllers:activity { type: 'error',
error:
{ msg: 'Uncaught TypeError: Cannot read property \'accountID\' of undefined',
full: 'TypeError: Cannot read property \'accountID\' of undefined',
stack: 'TypeError: Cannot read property \'accountID\' of undefined\n at AccountStore.<anonymous> (https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:12151:25)\n at Object.ID_1 (https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:10329:27)\n at AppDispatcher.module.exports.Dispatcher._invokeCallback (https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:10203:24)\n at AppDispatcher.module.exports.Dispatcher.dispatch (https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:10173:28)\n at AppDispatcher.handleViewAction (https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:1184:10)\n at https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:838:32\n at https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:15445:16\n at Request.callback (https://aurelienreeves.cozycloud.cc/apps/emails/js/vendor.js:34012:3)\n at Request.<anonymous> (https://aurelienreeves.cozycloud.cc/apps/emails/js/vendor.js:33683:10)\n at Request.Emitter.emit (https://aurelienreeves.cozycloud.cc/apps/emails/js/vendor.js:33145:20)' },
url: 'https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js',
line: 12151,
col: 25,
href: 'https://aurelienreeves.cozycloud.cc/apps/emails/#account/bb67b8eeca1d19e8a2ee8655b700f1a3/mailbox/bb67b8eeca1d19e8a2ee8655b701043b' }
EROR +0007 controllers:activity TypeError: Cannot read property 'accountID' of undefined
at AccountStore.<anonymous> (https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:12151:25)
at Object.ID_1 (https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:10329:27)
at AppDispatcher.module.exports.Dispatcher._invokeCallback (https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:10203:24)
at AppDispatcher.module.exports.Dispatcher.dispatch (https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:10173:28)
at AppDispatcher.handleViewAction (https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:1184:10)
at https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:838:32
at https://aurelienreeves.cozycloud.cc/apps/emails/js/app.js:15445:16
at Request.callback (https://aurelienreeves.cozycloud.cc/apps/emails/js/vendor.js:34012:3)
at Request.<anonymous> (https://aurelienreeves.cozycloud.cc/apps/emails/js/vendor.js:33683:10)
at Request.Emitter.emit (https://aurelienreeves.cozycloud.cc/apps/emails/js/vendor.js:33145:20)
[Tue, 07 Jul 2015 12:10:08 GMT] - POST /activity - 200 - 7.682 ms - 2
EROR +0001 errorhandler error handler called with BadRequest: Bad request : Cant refresh a non RFC4551 box
at module.exports.refresh (/usr/local/cozy/apps/emails/build/server/controllers/mailboxes.js:55:17)
at Layer.handle [as handle_request] (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/layer.js:82:5)
at next (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/route.js:110:13)
at /usr/local/cozy/apps/emails/build/server/controllers/accounts.js:26:12
at /usr/local/cozy/apps/emails/build/server/models/account.js:61:14
at /usr/local/cozy/apps/emails/node_modules/cozydb/lib/model.js:59:20
at /usr/local/cozy/apps/emails/node_modules/cozydb/lib/cozymodel.js:65:18
at parseBody (/usr/local/cozy/apps/emails/node_modules/cozydb/node_modules/request-json-light/main.js:74:10)
at IncomingMessage.<anonymous> (/usr/local/cozy/apps/emails/node_modules/cozydb/node_modules/request-json-light/main.js:99:14)
at IncomingMessage.emit (events.js:117:20)
[Tue, 07 Jul 2015 12:12:32 GMT] - GET /refresh/bb67b8eeca1d19e8a2ee8655b701043b - 400 - 11.929 ms - -
EROR +0000 errorhandler error handler called with BadRequest: Bad request : Cant refresh a non RFC4551 box
at module.exports.refresh (/usr/local/cozy/apps/emails/build/server/controllers/mailboxes.js:55:17)
at Layer.handle [as handle_request] (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/layer.js:82:5)
at next (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/route.js:110:13)
at /usr/local/cozy/apps/emails/build/server/controllers/accounts.js:26:12
at /usr/local/cozy/apps/emails/build/server/models/account.js:61:14
at /usr/local/cozy/apps/emails/node_modules/cozydb/lib/model.js:59:20
at /usr/local/cozy/apps/emails/node_modules/cozydb/lib/cozymodel.js:65:18
at parseBody (/usr/local/cozy/apps/emails/node_modules/cozydb/node_modules/request-json-light/main.js:74:10)
at IncomingMessage.<anonymous> (/usr/local/cozy/apps/emails/node_modules/cozydb/node_modules/request-json-light/main.js:99:14)
at IncomingMessage.emit (events.js:117:20)
[Tue, 07 Jul 2015 12:12:34 GMT] - GET /refresh/bb67b8eeca1d19e8a2ee8655b701043b - 400 - 11.718 ms - -
/apps/emails/build/server/controllers/mailboxes.js:55:17)
at Layer.handle [as handle_request] (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/layer.js:82:5)
at next (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/route.js:110:13)
at /usr/local/cozy/apps/emails/build/server/controllers/accounts.js:26:12
at /usr/local/cozy/apps/emails/build/server/models/account.js:61:14
at /usr/local/cozy/apps/emails/node_modules/cozydb/lib/model.js:59:20
at /usr/local/cozy/apps/emails/node_modules/cozydb/lib/cozymodel.js:65:18
at parseBody (/usr/local/cozy/apps/emails/node_modules/cozydb/node_modules/request-json-light/main.js:74:10)
at IncomingMessage.<anonymous> (/usr/local/cozy/apps/emails/node_modules/cozydb/node_modules/request-json-light/main.js:99:14)
at IncomingMessage.emit (events.js:117:20)
Hi,
Is there any roadmap that contains that issue fix ? Thanks for you good work and keep it up :+1:
Nope I am currently working on an overhaul of refreshment to avoid some race conditions and this issue will be part of it. Hopefully, it will finished in this sprint (max 2 weeks from now).
Hi @kao98, this should have been fixed with above mentionned overhaul. Do you still face the problem ?
Using emails 0.9.10 on a cozycloud.cc instance, here what I've got when I try to refresh my mailbox: http://reho.st/self/d4d5a162191f21d7045a3d96914347ca266d675d.png
HI. Using a docker container with up-to-date I have the same error as @kao98
BadRequest: Bad request : Cant refresh a non RFC4551 box
Yes me too
On the version's app 0.9.12 always the same problem
BadRequest: Bad request : Cant refresh a non RFC4551 box
at module.exports.refresh (/usr/local/cozy/apps/emails/build/server/controllers/mailboxes.js:33:17)
at Layer.handle [as handle_request] (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/layer.js:82:5)
at next (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/route.js:110:13)
at Route.dispatch (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/layer.js:82:5)
at /usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/index.js:267:22
at param (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/index.js:340:14)
at param (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/index.js:356:14)
at Function.proto.process_params (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/index.js:400:3)
at next (/usr/local/cozy/apps/emails/node_modules/americano/node_modules/express/lib/router/index.js:261:10)
Pretty annoying, i can't refresh my e-mails for 2 weeks on cozy.
I still can't read my emails with cozy-email 0.9.16. Cozy looses a huge interest without the ability to read e-mails.
I've added an account that doesn't support RFC4551 (1and1.fr).
It is never refreshed, without any error message to the user.
I just have the following error in the logs:
It looks like the refresh of a mailbox that doesn't support RFC4551 is deactivated in server/controllers/mailboxes.coffee at line 36.
Mailboxes supports yet deep_refresh and non RFC4551 compliant account. Why isn't it used?