"Signing in" forever in GitHub dev build

Description

I’m trying to run a dev build of Mailspring so that I can fix some bugs / do some feature development. I cloned the latest master branch from Github, ran npm install, and then npm start

The first time, I just got a white screen and this error message in the console:

Error: EPERM: operation not permitted, rename 'C:\Users\Daniel\AppData\Roaming\Mailspring-dev\compile-cache\ts\9e22ff4f512270e80b49c297abbfe170716f76d4\8b14ceee271a7e1787a9ce0ac479ab03f2ebb998.js.17844' -> 'C:\Users\Daniel\AppData\Roaming\Mailspring-dev\compile-cache\ts\9e22ff4f512270e80b49c297abbfe170716f76d4\8b14ceee271a7e1787a9ce0ac479ab03f2ebb998.js'

I closed and reopened it, and it showed the new user dialog, but after logging in with my Mailspring ID I just get “Signing in…” indefinitely:

If I copy my profile from the production version (C:\Users\Daniel\AppData\Roaming\Mailspring to C:\Users\Daniel\AppData\Roaming\Mailspring-dev), I can load it, but syncing doesn’t work, and I see this error when I try to add a new IMAP account or change the password of an existing IMAP account:

Your Mailspring ID is missing required fields - you may need to reset Mailspring

Any ideas?

To Reproduce…

Steps to reproduce the behavior:

Clone GitHub - Foundry376/Mailspring: A beautiful, fast and fully open source mail client for Mac, Windows and Linux.
npm install
npm run

Expected Behavior

It should work

Screenshots

As above

Setup

Commit 187ba07206f9952bfe70f0d09779689a5bc98df3

  • OS and Version: Windows 10, 21H1

It works fine if I run in prod mode (without the --dev flag). Just dev mode is broken. :thinking:

For my third attempt, I used “Run with Debug Flags” on the production build and signed in there. This got me further, as the sign-in actually worked.

Now the version from source actually started the main window, but I saw this at the bottom left:

image

In the console, I saw this error:

"Error: Setup Failed: Failed opening file C:\Users\Daniel\AppData\Roaming\Mailspring-dev\mailsync-40762268.log for writing: Permission denied
    at ChildProcess.onStreamCloseOrExit (file:///C:/src/Mailspring/app/src/mailsync-process.ts:291:21)
    at ChildProcess.emit (events.js:210:5)
    at ChildProcess.EventEmitter.emit (domain.js:476:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)"

I had no idea why it was giving a “permission denied” error. I even recursively modified the permissions on the folder to allow everyone full read/write access, yet I was still getting “permission denied”. That doesn’t make sense!

Eventually I used “Process Monitor” figured out that it was actually a sharing violation, not a permission error, as the production mailsync.exe was still running in the background and had locked the file. Killed it and everything seems to be working now.

Now the issue I’m having is that there’s no hot reloading (if I modify a .ts file, I don’t see the changes unless I close and reopen the app), but perhaps I’m doing something wrong, or perhaps that’s not implemented.