asticode / go-astilectron-bundler

Bundle your Astilectron app with ease

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not allowed to load local resource (Linux AMD64)

Happy-Ferret opened this issue · comments

Hi.

I have the problem that, under GNU/Linux (Microsoft WSL), the desktop build of my app fails to load with the following error logged to debug.

Not allowed to load local resource: file:///mnt/c/Users/user/Desktop/git/yggdrasil/resources/app/index.html%3Flang=C

The same app works fine under Windows.

Can you share the args you're passing to the NewWindow method ?

I'm using go-astilectron-bootstrap, so it looks as follows:

Windows: []*bootstrap.Window{{
			Homepage:       "index.html?lang=" + lang,
			MessageHandler: handleMessages,
			Options: &astilectron.WindowOptions{
				BackgroundColor: astikit.StrPtr("#5cc070"),
				Center:          astikit.BoolPtr(true),
				Height:          astikit.IntPtr(700),
				Width:           astikit.IntPtr(700),
			},
		}},

Where lang is a string like "en" or "fr", typically.

Does the path /mnt/c/Users/user/Desktop/git/yggdrasil/resources/app/index.html exist on your machine ?

I'm currently away, but that's interesting. I believe it's missing the "desktop-app" in-between "yggdrasil" and "resources".

Since you've posted the issue in the bundler repo, I assume that you're using it. Can you :

  • fetch the last bundler + astilectron changes
  • make sure to build the bundler
  • paste logs when you bundle as well as when you run the app

I'd like to see how paths are handled in the process.