Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo not working on local system #18

Open
marke123 opened this issue Jul 12, 2020 · 6 comments
Open

Demo not working on local system #18

marke123 opened this issue Jul 12, 2020 · 6 comments

Comments

@marke123
Copy link

After install the demo and trying to connect to a Fastmail account enabled for JMAP mail I get this error in the console when trying to login and login fails to do anything:

TypeError target[action] is not a function activate@http://localhost.example/jmap-demo-client/libs/Overture.js:12640:37

@mildred
Copy link

mildred commented May 2, 2021

This is caused by previous error failing the initialisation:

TypeError account is undefined getStoreKey@https://localhost/jmap-webmail/libs/Overture.js:22216:32
getRecord@https://localhost/jmap-webmail/libs/Overture.js:22328:33
App.state.selectedMessage<.record<@https://localhost/jmap-webmail/app/state.js:263:23
sync@https://localhost/jmap-webmail/libs/Overture.js:4230:26
connect@https://localhost/jmap-webmail/libs/Overture.js:4060:14
initBindings@https://localhost/jmap-webmail/libs/Overture.js:4332:45
Obj@https://localhost/jmap-webmail/libs/Overture.js:6056:40
init@https://localhost/jmap-webmail/libs/Overture.js:28665:58
@https://localhost/jmap-webmail/app/state.js:257:29
invoke@https://localhost/jmap-webmail/libs/Overture.js:3499:35
@https://localhost/jmap-webmail/app/state.js:9:11

@mildred
Copy link

mildred commented May 2, 2021

Store.prototype.getPrimaryAccountIdForType() returns undefined, which may be normal (no account before login) but it crashes initialization because getRecord() cannot record to store without an account id.

@mildred
Copy link

mildred commented May 2, 2021

When App.state.selectedMessage gets initialized, it will want to find the App.state.emailId and store it globally, which mixes it with the account Id, which does not exists since login is not yet performed.

@mildred
Copy link

mildred commented May 2, 2021

The solution is probably to provide a login page outside of the webmail and fetch the login user/pass programmatically in store.js.

@amessina
Copy link

It's been quite a while since this was reported, however I'm looking to do some testing directly with Cyrus-IMAP behind an Apache httpd instance (with Basic auth) and am encountering this same issue.

I'm wondering if you could elaborate on how you may have resolved this login issue. I guess I'm not sure where to begin in the code.

@amessina
Copy link

I was able to get a little further; in app/state.js I needed to update the following to match my server.

App.state = new O.Router({

    baseUrl: location.origin === 'https://example.com' ?
        'https://example.com/jmap-demo-webmail/' :
        location.origin + '/',
App.credentials = new O.LocalStorage( 'credentials', false, {
    server: 'https://example.com/.well-known/jmap',
    username: '',
    password: '',
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants