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

Make Chromedriver escript Compatible #495

Open
alecho opened this issue Dec 15, 2019 · 0 comments
Open

Make Chromedriver escript Compatible #495

alecho opened this issue Dec 15, 2019 · 0 comments

Comments

@alecho
Copy link

alecho commented Dec 15, 2019

Issue

Similar to #192 but for chromedriver. When embedding Wallaby in an escript Wallaby.Experimental.Chrome.Chromedriver fails to start.

00:13:35.372 [info]  Application wallaby exited: Wallaby.start(:normal, []) returned an error: shutdown: failed to start child: Wallaby.Experimental.Chrome
    ** (EXIT) shutdown: failed to start child: Wallaby.Experimental.Chrome.Chromedriver
        ** (EXIT) an exception was raised:
            ** (ArgumentError) unknown application: :wallaby
                (elixir) lib/application.ex:699: Application.app_dir/1
                (wallaby) lib/wallaby/experimental/chrome/chromedriver.ex:50: Wallaby.Experimental.Chrome.Chromedriver.wrapper_script/0
                (wallaby) lib/wallaby/experimental/chrome/chromedriver.ex:43: Wallaby.Experimental.Chrome.Chromedriver.start_chromedriver/1
                (wallaby) lib/wallaby/experimental/chrome/chromedriver.ex:23: Wallaby.Experimental.Chrome.Chromedriver.init/1
                (stdlib) gen_server.erl:374: :gen_server.init_it/2
                (stdlib) gen_server.erl:342: :gen_server.init_it/6
                (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3

This is because we can't access files within priv in escripts. The fix is similar to #193 where we load the script as a module attribute at compilation.

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 a pull request may close this issue.

1 participant