Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Unable to start app in dev env #25

Closed
skwerlman opened this issue Jun 27, 2019 · 11 comments
Closed

Unable to start app in dev env #25

skwerlman opened this issue Jun 27, 2019 · 11 comments

Comments

@skwerlman
Copy link

skwerlman commented Jun 27, 2019

Running the app generated by mix scenic.new without specifying the env (or specifying the dev env) results in the following error:

sk:/mnt/code/deck_ex $ mix scenic.run
sh: /mnt/code/deck_ex/_build/dev/lib/scenic_driver_glfw/priv/prod/scenic_driver_glfw: No such file or directory

19:53:33.183 [error] dirty close

running it using in the prod env works as expected:

sk:/mnt/code/deck_ex $ MIX_ENV=prod mix scenic.run
Compiling 1 file (.ex)

19:55:52.065 [info]  Received event: {:viewport_enter, {320.0, 239.0}}

19:55:52.076 [info]  Received event: {:cursor_enter, 4}

19:55:52.076 [info]  Received event: {:cursor_pos, {320.0, 239.0}}

19:55:53.272 [info]  Received event: {:cursor_pos, {319.0, 236.0}}

(cont)

running tests also seems to work, though no tests are defined

version info

scenic: 0.10.2
scenic_driver_glfw: 0.10.2
elixir/erlang:

Erlang/OTP 22 [erts-10.4.1] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:1] [hipe]

Elixir 1.8.2 (compiled with Erlang/OTP 22)

linux (archlinux):

Linux a2 5.1.15-zen1-1-zen #1 ZEN SMP PREEMPT Tue Jun 25 04:49:28 UTC 2019 x86_64 GNU/Linux

lemme know if there's any more info you need

@skwerlman skwerlman changed the title Unable to start app without prod env Unable to start app in dev env Jun 27, 2019
@boydm
Copy link
Collaborator

boydm commented Jun 27, 2019

The dirty close indicates the driver had a crash somewhere.

This is going to be hard for me to track down as I don't use or have archlinux installed. Probably a issue with the graphics driver.

Which driver are you using? Also, is Wayland installed?

@skwerlman
Copy link
Author

I'm using the proprietary nvidia driver (the dkms variant), version 430.26-7 along with glew 2.1.0-1 and glfw-x11 3.3-2

wayland is installed, along with xorg-server-xwayland; however, using the wayland variants of glew and glfw im unable to get it to work even in prod

@axelson
Copy link

axelson commented Jun 28, 2019

Hmmm, this looks like this might be the same issue I'm running into in ScenicFramework/scenic_new#36 (and I'm also on Arch Linux). For me I've noticed that it works if I run:

rm -rf _build/dev/lib/scenic_driver_glfw
mix scenic.run

Also the main difference appears to be that _build/dev/lib/scenic_driver_glfw/priv is a symlink after running the commands above, while initially it is not a symlink.

@axelson
Copy link

axelson commented Jun 28, 2019

As far as I can tell the issue seems to be that when the environment variable MIX_ENV is not set or is set to dev that Mix.env() is returning :prod which messes up all the paths. But I have been unable to track down why Mix.env() is returning an incorrect value.

@skwerlman
Copy link
Author

can confirm this workaround allows me to start the app in :dev

@axelson
Copy link

axelson commented Jun 28, 2019

Also it looks like it is expected that dependencies are compiled with mix env :prod: https://hexdocs.pm/mix/Mix.Tasks.Deps.html#module-dependency-definition-options

@nyaray
Copy link

nyaray commented Jun 29, 2019

I can confirm that setting MIX_ENV to prod works to get a newly generated app to start on mac.

@axelson
Copy link

axelson commented Jul 2, 2019

Hmmm, setting MIX_ENV to prod doesn't workaround the issue for me.

@axelson
Copy link

axelson commented Jul 27, 2019

This can be closed now that #26 is fixed (unless it shouldn't be closed until the next release is cut)

@boydm
Copy link
Collaborator

boydm commented Jul 28, 2019

The fix for this is now published to hex in v0.10.1

@skwerlman
Copy link
Author

skwerlman commented Jul 28, 2019

fix is confirmed working on a new project (and in previously broken ones)! thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants