jmapio / jmap-demo-webmail

Demo JMAP Webmail Client
MIT License
103 stars 20 forks source link

index.html only shows blank screen #10

Closed pmario closed 4 years ago

pmario commented 4 years ago

@neilj - It seems readme.md Install imo needs an update.

AND

Error console says:

Error Bad Router.baseUrl doRouting<@file:///D:/git/jmap-demo-webmail/libs/Overture.js:16507:29
init@file:///D:/git/jmap-demo-webmail/libs/Overture.js:16478:18
@file:///D:/git/jmap-demo-webmail/app/state.js:99:13
invoke@file:///D:/git/jmap-demo-webmail/libs/Overture.js:3426:35
@file:///D:/git/jmap-demo-webmail/app/state.js:15:11
Overture.js:3612:25
TypeError Binding#connect: fromObject is not set (fromPath = mailboxMessageList) connect@file:///D:/git/jmap-demo-webmail/libs/Overture.js:3980:19
flushQueue@file:///D:/git/jmap-demo-webmail/libs/Overture.js:3309:32
flushAllQueues@file:///D:/git/jmap-demo-webmail/libs/Overture.js:3351:27
invoke@file:///D:/git/jmap-demo-webmail/libs/Overture.js:3432:22
@file:///D:/git/jmap-demo-webmail/app/state.js:15:11
Overture.js:3612:25
TypeError App.state is undefined @file:///D:/git/jmap-demo-webmail/app/view.js:130:21
invoke@file:///D:/git/jmap-demo-webmail/libs/Overture.js:3426:35
@file:///D:/git/jmap-demo-webmail/app/view.js:11:11
platy commented 4 years ago

Also just trying this for the first time. In order to get the page to load I had to run in it a webserver - overture doesn't seem to work opening from the filesystem. Then the default option selected is to connect to fastmail JMAP, but this didn't work for me due to CORS.

FloatingSunfish commented 4 years ago

Also happening for me.

The fixtures.js line is already commented-out but JMAP.auth.didAuthenticate can't be found in state.js.

Could someone please shed some light on this? @neilj

s77rt commented 4 years ago

same here, however i got this working by running a web server, but still seeing CORS errors in the console...

s77rt commented 4 years ago

using the latest version of jmap-js, broke my current working setup due to CORS issues

pmario commented 4 years ago

@s77rt can you share your "almost" working setup. May be we can reproduce it and find out the right CORS settings needed.

s77rt commented 4 years ago

@pmario nothing special I just used the library that comes with this repo (jmap-demo-webmail), it kinda worked but still showing some cors errors. Then tried the latest library (jmap-js) hoping that it will fix the cors errors, actually it made it wrose and the webmail was not usable at all. (showing other cors errors)

platy commented 4 years ago

I believe theres only 2 ways to fix the cors issue.

  1. Change the cors settings on the backend to allow all origins (I don't think fastmail would want to do that)
  2. Bring the jmap servers under the same origin - run it in a Webserver and set up some reverse proxy paths on that server to the jmap backends that we want to log in to. With this there's no cors required
s77rt commented 4 years ago

@platy

  1. this is not easy as it seems, well you need to edit the download.json file that you get upon connecting to the jmap server (directly or via proxy): i used a proxy so the jmap session url is set to: 127.0.0.1/jmap and the webmail client is at 127.0.0.1 i though it would work, till i found that 127.0.0.1/jmap downloads a json file that contains other urls to fastmail.com; so we need to do even more work? that seems a lot for a demo...

I think it would be easier to setup a self hosted jmap server. (any suggestions on that? cyrus or james?)

the webmail is generating a bunch of errors, not sure if it's related to CORS or not.

even there is a weird 401 response for fastmail events endpoint https://jmap.fastmail.com/event/ no idea if it's fastmail's bug, or they intended to limit event access for some reason, or again it's the library fault

:/

neilj commented 4 years ago

Sorry for the delay in getting to this. The fixtures are a bit ropey so now you can (fairly easily) talk to a real server I've ripped them out altogether. I've updated the readme but basically:

pmario commented 4 years ago

@neilj ... If I open the link to https://jmap.io/jmap-demo-webmail/ I still get a white page only. ... No prompt for anything.

Using FF 75, ubuntu 20.04

Dev console says:

Loading failed for the <script> with source “https://jmap.io/jmap-demo-webmail/libs/Overture.js”. jmap-demo-webmail:12:1
ReferenceError: O is not defined
timezones-raw.js:7:1
ReferenceError: O is not defined
JMAP.js:79:13
ReferenceError: O is not defined
MailboxSourceView.js:11:12
ReferenceError: O is not defined
MailboxItemView.js:11:12
ReferenceError: O is not defined
ThreadMessageView.js:11:12
ReferenceError: O is not defined
MessageView.js:11:12
ReferenceError: O is not defined
EventItemView.js:11:12
ReferenceError: O is not defined
state.js:9:1
ReferenceError: O is not defined
view.js:9:1
s77rt commented 4 years ago

@pmario hmm it's working fine from my side, perhaps a cache issue? go to https://jmap.io/jmap-demo-webmail/libs/Overture.js and press CTRL+F5 then try again

pmario commented 4 years ago

hmmm. Thx for your time. ... It seems uBlock Origin needs to be disabled for this page.

qyb commented 2 years ago

hmmm. Thx for your time. ... It seems uBlock Origin needs to be disabled for this page.

Adblock Plus block Overture.js too