-
Notifications
You must be signed in to change notification settings - Fork 19
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
Detect proxy in desktop #396
Conversation
Deploying opendataeditor with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @roll .
get-proxy-settings
documentation suggest to use native electron
support instead: https://www.npmjs.com/package/get-proxy-settings
- If you are using electron it is recommended to use electron/chromium built in proxy support which is much more advanced.
Have you tried out the native support? https://github.com/electron/electron/blob/main/docs/api/command-line-switches.md#--proxy-serveraddressport
@pdelboca |
@pdelboca @pdelboca |
@roll which operating system did you test it with? Since this a desktop issue, I think we should try to test in Ubuntu, Windows 10 (version of the user who reported the issue) and Mac. |
@guergana I think there is a gotcha with the |
@roll how did you test the proxy? I tried configuring the default proxy and then tried to make the traffic be caught with postman and I couldn't make it work.. Could you list the steps that you followed? I think I missed something. I will also try to test it in my virtual machine for windows. |
@guergana |
Hello, @roll I am testing the branch in windows 10 pro (with a virtual machine in Ubuntu) and i got the error with the proxy activated: I am not sure the issue is fixed for Windows 10 (the original operating system of the person who opened the issue). Steps to reproduce the error in Windows 10:
There is nothing related to this error in the logs Note: the port 8080 is not set in the address i tested with, I also tried with I probably need to find a proper proxy address to test with but I still don't understand why we need a proxy upon loading the app, shouldn't all the packages already be contained in the installation package instead of downloading them on startup? |
@@ -18,22 +19,19 @@ export async function ensurePython() { | |||
log.info('[ensurePython]', { message }) | |||
} | |||
|
|||
export async function ensureLibraries() { | |||
export async function ensureLibraries(props: { proxyUrls: types.IProxyUrls }) { | |||
log.info('[ensureLibraries]') | |||
|
|||
const required = await readRequiredLibraries() | |||
const installed = await readInstalledLibraries() | |||
const missing = required.filter((spec) => !installed.includes(spec)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why would there be libraries missing from the installer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It uses the concept of idempotency. The user at any point of time can have:
- no installed dependencies
- partially installed dependencies (if a new version of ODE adds a new dependency)
- partially outdated dependencies (if a new version of ODE bumps a dependency's version)
So the installer calculates the diff and applies missing
parts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concept sounds elegant, but this means also that if a user downloads the app and then wants to open it for the first time and it's not connected to the internet, it will also throw the error, right? I think it is confusing why some additional libraries need to be installed if the user has already downloaded the binaries. I would switch to a 100% self contained version, this would also shorten the loading time at startup. @roll
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guergana I would also switch of course =)
The problem that packaging the python dependencies with tools like The second thing is accessing remote files via the server -- it also requires proxy information. It can be eliminated if |
Since we have more developer time available now probably than in the previous iteration maybe we can try to implement the self contained version? @roll . What do you think about this @pdelboca ? |
@guergana I agree with both of you. When working on #427 I read a little bit about how to package Python applications and as @roll mentioned, sadly all bundling solutions for python do not work as expected. I do think that we should bundle it since you are right that it doesn't make sense to have errors or need internet connection to open the application. Maybe instead of an executable file we zip/unzip the virtual environment on build/install. I'll take a look and propose some ideas. |
Please make sure that all the checks pass. Please add here any additional information regarding this pull request. It's highly recommended that you link this PR to an issue (please create one if it doesn't exist for this PR)