Ventero/FRESteamWorks

ANE Problems

fred1024 opened this issue · 35 comments

Hello, I am trying to build my application with the v0.5-2-gf59d5ba version of your ane (same for other anes). I have got this error on building : Some ANEs do not cover one of these platforms: MacOS-x86, default
I thought prebuilds were cross platform ? am i wrong ?
I am using FDT on Mac. thank you for your help

The ANEs are indeed cross-platform and I've actually used them successfully in FDT on OS X before. Are you sure that it's complaining about FRESteamWorks, and not some other ANE you may have added?

Are you able to reproduce the issue when creating a new project in FDT? If so, could you maybe export that project and upload it somewhere, so I can have a look at it?

Yes, i just have this ane only, weird .. I begin wondering if my fdt is not the problem...
here's a screen shot of my trouble,

screen shot 2014-12-05 at 11 17 29 am

I tried to restart a simple project from scratch with almost nothing in it but still no luck.
thanks for your help

I've actually been experiencing the same issue. We've since shipped on Windows only, as we haven't yet been able to get the ANE to work properly on Mac. I've even rebuilt the ANE from the provided source, and it all seems to be in order.

I've been using Flash Builder 4.7 for debugging, and packaging, though I've even tried packaging through ant scripts using the adt jar directly.

We are using latest version of Adobe AIR SDK 15.0.

Here is a link to a Flash Builder 4.7 test project with the extension for Mac that does not work running in debug or exporting captive runtime.

https://drive.google.com/file/d/0B_1_HSg79W1pY0ZWQzFMOWpteFE/view?usp=sharing

I've even tried using ant scripts to call the adt tool directly with no luck. The final package seems to include the ane files but I'm still getting an error:

1528 [DEBUG] SteamManager::init - Error #3500: The extension context does not have a method with the name AIRSteam_Init.
1528 [DEBUG] SteamManager::init - ArgumentError: Error #3500: The extension context does not have a method with the name AIRSteam_Init.
at flash.external::ExtensionContext/_call()
at flash.external::ExtensionContext/call()
at com.amanitadesign.steam::FRESteamWorks/init()[/Users/ich/Coding/FRESteamWorks/lib/src/com/amanitadesign/steam/FRESteamWorks.as:104]
at SteamManager/init()[/Users/mikezuba/JBG/SteamTest/src/SteamManager.as:106]
at Function/SteamTest.as$0:anonymous()[/Users/mikezuba/JBG/SteamTest/src/SteamTest.as:16]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.desktop::NativeApplication/dispatchEvent()
at Runtime/dispatchInvokeEventUnderProfile()
at runtime::AppRunner/onComplete()
at runtime::ContentPlayer/loadInitialContent()
at runtime::ContentPlayer/playRawContent()
at runtime::ContentPlayer/playContent()
at runtime::AppRunner/run()
at ADLAppEntry/run()
at global/runtime::ADLEntry()

@zubam It looks like in your case, the only problem is that Steam isn't able to figure out the app id. I've sent you an email with the details on how to solve the problem.

@fred1024 From your screenshot it looks like you have quite a few old FRESteamWorks ANEs in your project. Could you try deleting all of them from the project and only adding one of my pre-built ones back to ensure that FDT is not for some reason picking up one of the very old ANEs without OS X support?

I have the same problem as @zubam. Got this error:

ArgumentError: Error #3500: The extension context does not have a method with the name AIRSteam_Init.
at flash.external::ExtensionContext/_call()
at flash.external::ExtensionContext/call()
at com.amanitadesign.steam::FRESteamWorks/init()[/Users/ich/Coding/FRESteamWorks/lib/src/com/amanitadesign/steam/FRESteamWorks.as:104]
at control::SteamController/init()[/Users/wolfiee/Desktop/Game/src-demo/control/SteamController.as:48]
at Game/onInvoke()[/Users/wolfiee/Desktop/Game/src-demo/Game.as:89]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.desktop::NativeApplication/dispatchEvent()
at Runtime/dispatchInvokeEventUnderProfile()
at runtime::AppRunner/onComplete()

Could you please also send an email, how to deal with this problem? Or better yet, post a reply in this thread :)

I am also having the same problem as @zubam and @drunkcat. I'm running on Mac OSX with Flash Builder 4.7, and have tried running adl on command line as well as exporting a release version.

I'd definitely appreciate a reply to this thread with a solution to this issue.

@aclipski
We figured it out (withe the help of author of the game Letter Quest).
You have to include libsteam_api.dylib and steam_appid.txt ( steam_api.dll can be also included ), so that it will be in your gamename.app/Contents/Resources/ after publishing.
This is working for publishing it on Steam, not for debugging.

I am having the same problem as @zubam and @drunkcat but I have included libsteam_api.dylib, steam_appid.txt and steam_api.dll but still having errors. @Ventero could you send me an email as well as to what is going wrong? Thanks!

Hey there. Also having the exact same issue as @jbg-zuba I was wondering if anyone could help solve this? @Ventero would you also send me an email or post the answer on here?

Hi, I have the same problem :-/

"ArgumentError: Error #3500: The extension context does not have a method with the name AIRSteam_Init."

I am using the latest ANE from your site.

Do you have already solved this?
Thanks.

Building to Steam (Mac)

  1. Make a release build of game from the flash builder workspace. Export -> Release Build.
  2. Download steam sdk on your mac. Steam SDK
  3. unzip and place inner sdk inside the Documents folder.
  4. Your folder structure should look like this “Documents/sdk”
  5. unzip “ContentPrep” under the tools folder.
  6. Make a folder in your “Documents” called “steampipe”
  7. Place the unzipped ContentPrep.app inside steampipe.
  8. Your folder structure should look like this “Documents/steampipe/ContentPrep.app”
  9. Download wxPython 2.8.12.1 HERE.
  10. RUN this in the Terminal.

python ~/Documents/steampipe/ContentPrep.app/Contents/MacOS/contentprep.py --console --verbose --source --dest ~/Documents/sdk/tools/ContentBuilder/content --appid 360730 --nowrap

  11. You should now have the app inside of “sdk/tools/ConentBuilder/content”
  12. Configure your app_build and depot_build scripts – this could be a pain email me if you want templates.
  13. You’re all done on mac. zip up the sdk and place it in on a windows machine.
  14. Once it’s on a windows machine you have to configure some paths.
  15. In the depot_build script next to “ContentRoot” place the directory for the “content” folder   (where the .app lives)
  16. by the “InstallScript” put the full directory of where the installscript is this lives inside your .app file. ( YOU CAN SEE HOW TO DO THIS ON THE STEAM SITE)
  17. Examples are in the depot_build scripts I have if you need them (email me for them)
  18. Configure your run_build.bat file.
  19. Go to https://partner.steamgames.com/home then click on YOUR GAME. 
  20. Edit steamworks settings > Builds > set the build you just uploaded to default > follow instructions. 

*NOTE : in the python command above 11 you can set the --dest to your windows machine directly if you have advanced sharing options enabled and are connected to your windows computer. It’s a lot faster. if you don’t know how to do this LEARN HERE.

This should solve everyones problem. please email me for templates of the scripts and/or questions, concerns.

Thanks, but I am on Windows and using FDT,.. do you have any solution for Windows and FDT?

Hi,
but I even cant compile it in debug mode (windows, FDT) (I am using FreSteamDebug.ane, and I got error message "Error #3500: The extension context does not have a method with the name AIRSteam_Init."
.. in non debug ane I got error "Error: Duplicate platform Windows-x86 found for extension com.amanitadesign.steam.FRESteamWorks").
I am using latest version of FRESteamWorks and trying compile example project.

Thanks for help.

I fixed this error by adding steamSDK path to system environment.

But the function init()
isReady = _ExtensionContext.call("AIRSteam_Init") as Boolean;
return always false.

I followed these 3 steps on official steam sdk page when AIRSteam_Init can return false:
"A return of false indicates one of three conditions:

  • The Steam client isn't running. A running Steam client is required to provide implementations of the various Steamworks interfaces.
  • The Steam client couldn't determine the AppID of game. Make sure you have Steam_appid.txt in your game directory.
  • Your application is not running under the same user context as the Steam client, including admin privileges."

I have started steam client,... I added dlls to the all possible places with steam_appid.txt with my appid. And debugging the app via FDT which is started with admin privileges (steam too).

But it always return false. Do you know any solution for this problem?

Hi.
Problem was solved by building native exe,... from debug (FDT) it was not working.

I can't get it to work. I've put all dlls and steam_appid.txt file next to adl.exe and it looks like the libs are loaded correctly. But init() always returns false. What am I missing?

@Geardice I met the same question:"ArgumentError: Error #3500: The extension context does not have a method with the name AIRSteam_Init."
Can you tell me how to deal with it.

I was running into similar issues as mentioned above (#3500 error and then air init failure) but got the app working in both debug (from ide) and running the packaged exe.

Make sure the steam_api.dll AND a steam_appid.txt reside in the same location as the exe (for testing the packaged app) and in the same folder as AIRSDK/bin/adl.exe when debugging from ide.

If you don't have an app id yet simply create an empty steam_appid.txt text file with the value 480 in it. This should work fine for testing.

Steam must be running as well.

https://github.com/arexsvn I did just like you said ,but still show the error 3500。Can you give me a email to learn how to do that。

Finally,I've solved this problem ,you just need to push steam_api.dll、steam_api.lib、steam_appid.txt in you resource folder,so that the exe can include them。 then you need to run you exe in the Steam。

I'm getting the error 3500 too. I tried everything i understood but couldn't make it work.
I'm using Flash Develop and this to create a bundled stand alone:
call adt -package %SIGNING_OPTIONS% -target bundle %AIR_NAME%_standalone %APP_XML% %FILE_OR_DIR% -extdir lib/adt/
I put steam_appid.txt, steam_api.lib and steam_api.dll in my \bin folder but it still doesn't work, even if i change the files in the C:\Program Files (x86)\Steam\steamapps\common\mygamename folder
@mkTiger or anyone who solved it could tell me any clue?

https://github.com/Jacowaco
when you test you word with flashdevelp in debug mode, you will certainly get the error,but when you run your exe packege in Steam, the error will disappear。

Hi!
Does anybody have working tutorial how to configure depot files and use ContentPrep.app for Mac? The problem is after i use ContentPrep.app i can't run my .app. Same locally and after i downloaded the game via Steam client.
thanks!

@chrust33 You don't need ContentPrep anymore for Steam. Put this file in your app next to Contents and call it "installscript_osx.vdf". Change "yourGame.app" to whatever it is and then upload that app to Steam and see if it works from there.

If all else fail, upload it from a mac, that should work right away

@jeroenman Same. I can launch the game before uploading but I can't after i installed in Steam. Could it be I move the .app to Windows machine wrong way? The way i do it currently is : zip the .app -> copy to Windows -> remove .zip from the end. And how should InstallScript param in depot file look like? Here is my depot file
I need to upload both Mac and Win versions. Can i do this from Mac?

@chrust33 You can just extract the whole .app to your osx_content folder. What essentially happens is that the files lose its symlinks (similar to shortcuts). In the installscript you'll describe them again to Steam, so it should link them up again when you upload the files. Make sure you've replaced all the "yourgame.app" parts with "HeroicDungeon.app".

Your depot files looks good. I direct it from contentRoot, but it shouldn't matter too much. Here's my file, just in case.

If that doesn't work, It would be easier to upload from a mac. You can just upload both mac and windows builds. There's still some trouble you can have in the terminal, but it's worth a shot.

Let me know how it goes. If you need help, you can also shoot me an email at jeroen[at]illusivegames[dot]com

On another note, I'm helping some friends with their achievement, but now where having the same problem as @Geardice and @arexsvn.

steamworks.init() just returns false, but only in some cases! I followed the advise in this thread. For most of the players everything does work fine, but some report achievements not unlocking and the init seems to be the reason.

Anyone has any idea why this could be?

@arexsvn Thanks for your response. I made sure to start Steam, and have the steam dll and txt at the right place. For me it works, but it's just puzzling how it does not working for SOME windows users. Maybe some outside variables just mess with it

Hi everybody, I got an issue recently.
I'm using Flash Professional CC with AIR 26.0. The build was succeed with no compile error. But when I'm trying to run the exe, it stuck at SteamAPI_Init(). The window is black and very laggy.
I already put the latest steam_api.dll with the right steam_appid.txt in the same folder with the exe and my steam is running too. (I can see my game's status changed to "Running" in steam)
Does anyone know how to deal with that?

I'm getting the error 3500 too. I tried everything i understood but couldn't make it work.
I'm using Flash Develop and this to create a bundled stand alone:
call adt -package %SIGNING_OPTIONS% -target bundle %AIR_NAME%_standalone %APP_XML% %FILE_OR_DIR% -extdir lib/adt/
I put steam_appid.txt, steam_api.lib and steam_api.dll in my \bin folder but it still doesn't work, even if i change the files in the C:\Program Files (x86)\Steam\steamapps\common\mygamename folder
@mkTiger or anyone who solved it could tell me any clue?

make a exe program and run it in Steam,local test doesn't work,local test will show 3500 error forever.

@mkTiger, @Ventero Shouldn't we be able to also test the apps/games in debug mode(local test)? I understood by reading the documentation that we should. I've managed so far to release a build and -after moving manually the steam_appid.txt file into the MacOS folder inside the test.app file- I managed to launch the test project. I have not been able to test this debugging in Flash Builder though, which I need for obvious reasons. Any ideas on how to achieve that? This is how my folder structure looks right now:

screenshot 2019-01-07 17 48 44

Also, I've added the DYLD_FALLBACK_LIBRARY_PATH to point to the steam_sdk/redistributable_bin/osx32

But no luck so far. Any help will be appreciated!

Nevermind, already got it working. I had to manually add the libsteam_api.dylib file inside /usr/local/lib (as an alias) and add the steam_appid.txt inside the AIR_SDK/bin folder. Working now in both debug and release modes