To recap, it works nicely if I change location.pathname => window.location.pathname since then the call looks like "/account/mail/general".slice("/account".length), so currently location.pathname use looses /account "base name".
PS There might be other places in the code base where similar issue takes place, I just highlighted the one case I've spotted.
https://github.com/ProtonMail/proton-account/blob/d00e5966aa1fbbb95dab98ab83004180fa5a229b/src/app/content/MainContainer.tsx#L65
My understanding is that the arg should be changed
location.pathname => window.location.pathname
since currently it gets called with/mail/general
arg instead of seems to be expected/account/mail/general
and then gets converted toneral
by https://github.com/ProtonMail/proton-shared/blob/03c8f95a7f9c90855ca2f39254f001842ce8d469/lib/authentication/pathnameHelper.ts#L26 ("/mail/general".slice("/account".length)
) which ends up with unresolvedapp
.To recap, it works nicely if I change
location.pathname => window.location.pathname
since then the call looks like"/account/mail/general".slice("/account".length)
, so currentlylocation.pathname
use looses/account
"base name".PS There might be other places in the code base where similar issue takes place, I just highlighted the one case I've spotted.