Running Against Open Source Sync Engine
Hi fellas! :wave:
I got trouble with configuration of Self-Hosted Nylas Sync Engine, following this instruction: https://github.com/nylas/N1/blob/master/CONFIGURATION.md
- Nylas Sync Engine in Vagrant installed successfully.
- Added acount with
inbox-authscript. - Started Engine and the API.
- Made changes to
~/.nylas/config.jsonjust like written in guide.
When Nylas N1 started and attempt to synchronize with server I get the following error:
APIError: Could not verify access credentials.
I made sure server setup and works correctly:
curl --user 'MY_ID' http://localhost:5555/threads
return JSON of my emails, so credentials are correct.
System: Ubuntu 16.04 N1: 0.4.32-1de17e7
Please, let me know if needed some more information. Looking forward for your suggestions.
Open from the menu: Developer > Activity Manager
What requests do you see?
Here's a part of output with cut hash in address:
12:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/contacts/rankings"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/events?limit=30&offset=0"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/events?view=count"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/calendars?limit=30&offset=0"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/calendars?view=count"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/contacts?limit=30&offset=0"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/contacts?view=count"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/drafts?limit=30&offset=0"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/drafts?view=count"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/labels?limit=1000&offset=0"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/labels?view=count"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/messages?limit=30&offset=0"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/messages?view=count"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/threads?limit=30&offset=0&view=expanded"
40112:31:19 RunCopycurl -X GET "http://SOME_HASH:@localhost:5555/threads?view=count"
40112:31:19 RunCopycurl -X POST -d '{}' "http://SOME_HASH:@localhost:5555/delta/latest_cursor"
When I execute some of these requests from terminal I get:
Could not verify access credential.%
I just have no clue where I supposed to provide my credentials.
Hmm - I have a hunch this is related to a switch we made to store access credentials in the system keychain, but I'll try to reproduce and see if I run into anything.
@bengotow Have you had any success so far?
@seniorihor Did you manage to get this working? I'm facing exactly the same problem.
@shchukax I stuck on this issue and still can't manage to get it working.
Guys, anyone got a chance to reproduce this issue or maybe some ideas how to fix it?
I finally managed to get this working with a sync engine running in a local VM. I am running the VM using libvirt, so had to update the Vagrantfile for that - but that's irrelevant. It was more of a try-and-see tactic, so I'm not quite sure what finally worked, but I now have N1 running on my local linux machine talking to a sync engine running in a VM on the same linux machine - with 2 accounts - one google and one yahoo. For reference, here's my full config.json file (with ids masked, of course):
{
"*": {
"env": "local",
"core": {
"disabledPackages": [
"composer-templates",
"composer-translate",
"message-view-on-github",
"personal-level-indicators",
"phishing-detection",
"github-contact-card",
"send-later",
"link-tracking",
"open-tracking",
"composer-mail-merge",
"composer-emoji",
"activity-list",
"composer-scheduler"
],
"disabledPackagesInitialized": true,
"workspace": {
"mode": "split"
},
"keymapTemplate": "Apple Mail",
"reading": {
"autoloadImages": false,
"backspaceDelete": true
}
},
"updateIdentity": "my-identify-uuid",
"devMode": true,
"nylas": {
"accounts": [
{
"client_id": "local-someId1",
"server_id": "accountIdFromServer1",
"object": "account",
"account_id": "accountIdFromServer1",
"metadata": [],
"name": "Full Name",
"provider": "gmail",
"email_address": "[email protected]",
"organization_unit": "label",
"label": "[email protected]",
"aliases": [],
"sync_state": "running",
"id": "accountIdFromServer1"
},
{
"client_id": "local-someId2",
"server_id": "accountIdFromServer2",
"object": "account",
"account_id": "accountIdFromServer2",
"metadata": [],
"name": "",
"provider": "yahoo",
"email_address": "[email protected]",
"organization_unit": "folder",
"label": "[email protected]",
"aliases": [],
"sync_state": "running",
"id": "accountIdFromServer2"
}
],
"accountsVersion": 3,
"threadCountsValid": true,
"account-accountIdFromServer1": {
"signature": ""
},
"account-accountIdFromServer2": {
"signature": ""
}
}
}
}
I don't remember ever putting in the values for client_id, so it must be something that N1 did on its own. Hopefully, this helps someone.
Now if only the open source version supported exchange...
@shchukax, would you mind sharing your vagrantfile that is converted to work with libvirt?
I think this issue should be fixed with the change we made a while back that added a UI to self-hosting! Closing for now.