u3d icon indicating copy to clipboard operation
u3d copied to clipboard

Build an Android with Facebook SDK - openssl in not a valid win32 application (MSYS2 & Ruby Windows & Windows 10)

Open diegotorresvl opened this issue 7 years ago • 4 comments

Issue Checklist

  • [x ] I'm using the latest u3d version
  • [x ] I ran u3d --help
  • [x ] I read the README
  • [x ] I made sure that a similar issue doesn't exit

Issue Description

When trying to build an Android apk with Facebook SDK installed it seems there is an error when internally run openssl as it throws an error related with not a valid win32 application.

I try to replicate the steps I am doing and my environment: ENVIRONMENT: Windows 10 Ruby 2.5 x64 for installing u3d gem MSYS2 x64 for running scripts from bash

The PATH variable contents the openssl.exe path for windows and in MSYS2 /usr/bin (MSYS2 and Ruby) has been renamed to openssl.exe.bak just for forcing getting from the PATH. I have NOT installed Ruby on MSYS2

RUN: `#!/bin/sh

UNITY_VERSION=2018.2.15f1 export U3D_NO_TTY=1 #For running u3d from MSYS2 alias u3d='/c/Ruby25-x64/bin/u3d'

Run the build

u3d run -u $UNITY_VERSION --trace --
-quit -batchmode -nographics
-projectPath "/d/Test/AndroidDebug/"
-executeMethod Builder.Build
${UNITY_ARGS}
-r`

The output is:

[17:29:59] [GENERAL] [LOG] Builder.cs(line 43): Builder: Player failed 1 errors, 0 warnings
[17:29:59] [GENERAL] Builder.cs(line 48): Builder: Player failed 1 errors, 0 warnings
[17:29:59] [GENERAL] Argv.cpp(line 295): executeMethod method Builder.Build threw exception.
[17:29:59] [GENERAL] Aborting batchmode due to failure:
[17:29:59] [GENERAL] executeMethod method Builder.Build threw exception.
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/u3d-1.1.2/lib/u3d_core/command_executor.rb:103:in `execute_command_low': Exit status: 1 (RuntimeError)
        from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/u3d-1.1.2/lib/u3d_core/command_executor.rb:89:in `execute_command'
        from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/u3d-1.1.2/lib/u3d/unity_runner.rb:55:in `run'
        from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/u3d-1.1.2/lib/u3d/commands.rb:214:in `run'
        from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/u3d-1.1.2/lib/u3d/commands_generator.rb:99:in `block (2 levels) in run'
        from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/commander-4.4.7/lib/commander/command.rb:182:in `call'
        from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/commander-4.4.7/lib/commander/command.rb:153:in `run'
        from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/commander-4.4.7/lib/commander/runner.rb:446:in `run_active_command'
        from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/commander-4.4.7/lib/commander/runner.rb:68:in `run!'
        from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/commander-4.4.7/lib/commander/delegates.rb:15:in `run!'
        from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/u3d-1.1.2/lib/u3d/commands_generator.rb:260:in `run'
        from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/u3d-1.1.2/lib/u3d/commands_generator.rb:40:in `start'
        from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/u3d-1.1.2/exe/u3d:7:in `<top (required)>'
        from C:/Ruby25-x64/bin/u3d:23:in `load'
        from C:/Ruby25-x64/bin/u3d:23:in `<main>'

Do you know how could I solve this problem?

diegotorresvl avatar Nov 20 '18 16:11 diegotorresvl

Hello @diegotorresvl not sure if you solved your issue. In the log you display here, there's nothing about openssl and win32. Instead it looks you have a compilation issue (Builder: Player failed 1 errors), which isn't related to u3d.

Is this still an issue for you?

lacostej avatar Feb 21 '19 14:02 lacostej

Sorry, I paste the log output without the important line: This is the error that console shows:

Builder:
Postprocess built player: [Exception] Win32Exception: ApplicationName='cmd', CommandLine='/Cecho "xxx" | openssl base64', CurrentDirectory='', Native error= %1 is not a valid Win32 application.

diegotorresvl avatar Feb 27 '19 11:02 diegotorresvl

Is OpenSSL in your PATH? See https://answers.unity.com/questions/619490/error-when-opening-facebook-settings.html

See also https://www.google.com/search?q=unity%20%2FCecho%20"xxx"%20|%20openssl%20base64

lacostej avatar Feb 27 '19 16:02 lacostej

Yes it is. I could build the app with GitBash without problem but not with MSYS2 (nor MinGW64 nor MinGW32). Both are inheriting from PATH. Note that error you paste is not the same as mine "Native error= %1 is not a valid Win32 application." Thanks for your attention and your time

diegotorresvl avatar Mar 12 '19 11:03 diegotorresvl