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

Fix for issue 118 #119

Merged
merged 1 commit into from
Oct 11, 2020
Merged

Fix for issue 118 #119

merged 1 commit into from
Oct 11, 2020

Conversation

mastazi
Copy link
Contributor

@mastazi mastazi commented Oct 2, 2020

Fixes issue #118

Hey @Paxa

it seems that this line from app.js is not working on Windows:

root: remote.app.MainFilename.replace(/\/(index\.html|main\.js)/, ''),

here's the error from console when I try to open "See History", you can see that /index.html is not removed :

Error: ERR_FILE_NOT_FOUND (-6) loading 'file:///C:/Users/[user]/AppData/Local/Programs/Postbird/resources/app.asar/index.html/views/history_window.html'

Same when I open snippets.

Error: ERR_FILE_NOT_FOUND (-6) loading 'file:///C:/Users/[user]/AppData/Local/Programs/Postbird/resources/app.asar/index.html/views/snippets_window.html'

So I changed the way we get the root of the app, and now it works on my Windows machine

root: remote.app.getAppPath()

you can see getAppPath() documentation here:

https://github.com/electron/electron/blob/master/docs/api/app.md#appgetapppath

@mastazi mastazi changed the title Update app.js Fix for issue 118 Oct 2, 2020
@Paxa
Copy link
Owner

Paxa commented Oct 11, 2020

Thank you

@Paxa Paxa merged commit aec5f08 into Paxa:master Oct 11, 2020
@antoniojhinojosa
Copy link

Hi, I am trying to fix this in my windows computer but I cannot find the file "app.js" described here in my computer. The most similar I can find is in "C:\Program Files\PostgreSQL\13\pgAdmin 4\web\pgadmin\static\bundle\app.js" but I cannot find that line , I guess this one is from PostgreSQL not PostBird itself. I also looked for in the "Appdata\Roaming\Postbird and Appdata\Local\Postbird" folder and couldn´t find it there either. Could someone assist me please? Thank you!!

@mastazi
Copy link
Contributor Author

mastazi commented May 3, 2021

@antoniojhinojosa If you just installed using the installer you will not find that js file on your computer. You need to clone the repository, change the js file and then compile the app on your own machine. You need some familiarity with compiling Electron apps.

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

Successfully merging this pull request may close these issues.

3 participants