Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Justin

Pages: 1 2 3 4 ... 201
16
Looks like you're running into a problem with the Flash target.

While Flash is sometimes still valuable as a quick testing platform, it's also virtually unusable for publishing at the moment, since web browsers no longer support it, and third-party emulators like ruffle don't fully support the ActionScript 3 language and APIs yet.

Given this, not a lot of resources are devoted to Flash support right now, so if you end up hitting a bug, that's pretty much a show-stopper. I'd suggest just using a different platform for testing, such as HTML5.

---

Having said that, here's the error:
Code: [Select]
Running command: BUILD
 - Running command: haxe Export/flash/haxe/debug.hxml
Error: The input swf Export/flash/obj/assets.swf is corrupted

Perhaps you could try disabling the higher-scale assets in your project and see if that somehow fixes this (assuming you're not actually using higher-resolution scales)?
[Settings] > Web > Settings > Scales: make sure only 1x is checked
[Settings] > Settings > Advanced > Project Scales: make sure only 1x is checked
[Menu Bar] > Tools > Game > Clean Project
[Menu Bar] > Tools > Game > Cleanup Unused Files

Then try testing your game again.

17
Ask a Question / Re: target api 31
« on: November 03, 2022, 12:30:42 am »
A public release of Stencyl hasn't been made in a long time, but the subscribers-only releases are still updated frequently. At the moment, the changelog for private builds is only updated on discord, so you can reference that as well if you have questions about compatibility with the latest operating systems and API requirements.

API 31 is supported in the latest private releases since mid-August.

18
Ask a Question / Re: HTML5 game not loading on GameJolt
« on: October 30, 2022, 07:51:37 pm »
I took a quick look at the link to the game you posted a few days ago. As you said, it's all 403 errors for the game assets. Checking the payload data in the Chrome dev console, it appears to be getting a "SignatureDoesNotMatch" error from aws. Perhaps there's a problem with gamejolt's cdn. If you can get some support from the folks at gamejolt with this, they ought to have a better idea what's going wrong here.

19
Ask a Question / Re: HTML5 game not loading on GameJolt
« on: October 27, 2022, 04:32:08 pm »
Posting a link to your game on GameJolt, or posting the logs from the developer console when you try to play the game, may be more helpful.

20
Ask a Question / Re: HTML5 game not loading on GameJolt
« on: October 26, 2022, 05:44:51 pm »
You should check the developer console of the browser when the game is loading for errors. If the game is failing to load, that's very likely to show the cause.

21
Ask a Question / Re: HTML5 Compiling Failure
« on: October 20, 2022, 10:22:22 pm »
Source map processing is disabled for now, as of 4.1.0-beta3/b11123, which will prevent this failure.

22
Quote
First off, the ads don't work. I connected my Google Ad Mob to the project. I even tried uploading the game to Google Play and installing it from the phone. I followed the Stencyl Ad Mob guide and I have test ads enabled.
I tried using both banner ads and interstitial ads and they just don't show up.
I made sure to initiate the ads and load the interstitial.

When the game starts, I initialize ad mob, then load the ad.
To test it, I made an actor that displays the ad when clicked.
I also added a normal banner ad with When Created in a scene.

Are all three fields in Settings > Mobile > Monetization > AdMob Ads - Android filled out with the id starting with "ca-app-pub-..."?

Did you wait for the "ad area loads" event before using the "show ad" block for the interstitial? It may be helpful to print debug info to the logs or to the screen so you can see exactly when the events have triggered.
Did you use the events to check for admob "fails to load" error, for both the banner and interstitial?

Quote
Second off, testing the game via Test does not work.
It tells me to generate logs. Here are some generated logs: https://drive.google.com/file/d/1zWFu66e9rWa4TI5LbvorBwwUWc9hFBC3/view?usp=sharing
Notes:
- I did try this on a clean project and it still doesn't work
- My USB debugging and all that works because testing a game directly from the engine works for the Godot engine

Running into the same issue as yesterday again. Searching the logs for "Link: libApplicationMain-", there were a number of attempts to compile the game during this Stencyl session.

It looks like it was failing at first. You tested a different game (Android Game 3) and that worked. Then you went back to Tilefinder, cleaned the project, and tried again. Your first attempt after cleaning the project was to publish an APK. This worked. You published an APK again, and again it worked. Then you tried to test, and it failed with the same linker errors. Later attempt to publish an APK still worked, and later attempts to test still failed.

I'd assume that cleaning the project and then testing would make it work. I think that there's some internal configuration mismatch between testing and publishing that's causing this. I'll try to reproduce it and fix it soon.

23
I responded on discord, so I'll copy the response here.

Quote
All I can say at the moment is that it's a completely different error.
It's the linker linking together the compiled object files, but there's a mismatch somewhere.
Perhaps some of the files were compiled with different settings from each other, and trying to link these mismatched objects is causing the error.
Ideally hxcpp would recompile files whenever needed, but I've found that it can be a little dumb sometimes.
I kinda hate to give the same advice here, but could you try a clean rebuild again?

If the issue persists I'd be happy to look into it more in-depth.

24
That's odd. I looked through the log you sent with the previous build, and it has AndroidManifest.xml files being copied from the following locations.

Code: [Select]
- Copying template file: <lime haxelib>/dependencies/extension-api/src/main/AndroidManifest.xml -> Export/android/bin/deps/extension-api/src/main/AndroidManifest.xml
- Copying template file: <google-play-games extension>/dependencies/google/AndroidManifest.xml -> Export/android/bin/deps/google/AndroidManifest.xml
- Copying template file: <stencyl install>/plaf/lime-templates/android/template/app/src/main/AndroidManifest.xml -> Export/android/bin/app/src/main/AndroidManifest.xml

This is all standard stuff, not the result of any custom engine extension. Perhaps you could try doing a clean compile again now that you have the latest build?

25
It's hard to tell what this does without seeing what the custom blocks do, so I'm not sure meaningful advice can be given.

It sounds like the problem might be that you're only running this code once (in a "do after" event) when you might have intended to keep running this code (with a "do every" or "updating" event).

26
The things you posted about the deleted actor in the scene is unrelated to your Android issues.

It looks like you later opened that scene and then saved the game. That would have caused the deleted actors to be permanently removed from the scene. So if you opened the xml file afterward, that would explain their absence. You shouldn't see those errors in your logs anymore.

27
Last time you posted about android problems on Discord, you were using b11028, and I recommended that you update to the latest private build.

At he top of your logs, I see this:
Code: [Select]
Stencyl Version: 4.1.0-beta [ci/410-beta3] (b11028)
So it looks like you're still using the same Stencyl build you were using back then.

Near the end of your logs, I see this:

Code: [Select]
Manifest merger failed : android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

This is precisely the problem that was fixed in 4.1.0-beta3/b11106.  See this Stencyl issue for more details: Android target API 32 (12L) : Failed merge Manifest

If you update to the latest private build, and you still see the same exact error, my advice in the linked issue stands:
Quote
It's possible for the same problem to be present in engine extensions you're using, which will also need to be updated for Android 12+ support. Running without any custom engine extensions should allow the game to compile.

If you post links to the engine extensions you're using, I can try to make any necessary updates.


The latest private build should allow you to export both apk and aab, and it should work with Android 12+. If that's not the case, let me know and I'll fix it.

28
Ask a Question / Re: HTML5 Compiling Failure
« on: September 26, 2022, 08:43:00 pm »
I investigated this a couple weeks ago. Here are the notes I took at the time.

When publishing to HTML5 on Windows, during the closure compiler step, the build may error with a message like this:
Code: [Select]
[haxelib.exe] java.nio.file.InvalidPathException: Illegal char <:> at index 4: file:///C:/Users/Username/AppData/Local/Stencyl/libs/haxelib/shohei909/tweenxcore/1.0.4/tweenxcore/Tools.hx
[haxelib.exe]  at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
[haxelib.exe]  at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
[haxelib.exe]  at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
[haxelib.exe]  at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
[haxelib.exe]  at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
[haxelib.exe]  at sun.nio.fs.AbstractPath.resolveSibling(AbstractPath.java:66)
[haxelib.exe]  at com.google.javascript.jscomp.SourceMapResolver.getRelativePath(SourceMapResolver.java:102)
[haxelib.exe]  at com.google.javascript.jscomp.Compiler.getSourceMapping(Compiler.java:2883)
[haxelib.exe]  at com.google.javascript.jscomp.SourceMap.addMapping(SourceMap.java:175)
[haxelib.exe]  at com.google.javascript.jscomp.CodePrinter$MappedCodePrinter.generateSourceMap(CodePrinter.java:153)
[haxelib.exe]  at com.google.javascript.jscomp.CodePrinter.toSource(CodePrinter.java:849)
[haxelib.exe]  at com.google.javascript.jscomp.CodePrinter.access$300(CodePrinter.java:40)
[haxelib.exe]  at com.google.javascript.jscomp.CodePrinter$Builder.build(CodePrinter.java:778)
[haxelib.exe]  at com.google.javascript.jscomp.Compiler.toSource(Compiler.java:2278)
[haxelib.exe]  at com.google.javascript.jscomp.Compiler.lambda$toSource$11(Compiler.java:2239)
[haxelib.exe]  at com.google.javascript.jscomp.CompilerExecutor.runInCompilerThread(CompilerExecutor.java:129)
[haxelib.exe]  at com.google.javascript.jscomp.Compiler.runInCompilerThread(Compiler.java:826)
[haxelib.exe]  at com.google.javascript.jscomp.Compiler.toSource(Compiler.java:2201)
[haxelib.exe]  at com.google.javascript.jscomp.Compiler.lambda$toSource$9(Compiler.java:2158)
[haxelib.exe]  at com.google.javascript.jscomp.CompilerExecutor$2.call(CompilerExecutor.java:102)
[haxelib.exe]  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[haxelib.exe]  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[haxelib.exe]  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[haxelib.exe]  at java.lang.Thread.run(Thread.java:748)

It would appear that there are various issues with source map support with Haxe-generated JS and the closure compiler.

First, Haxe uses url-encoding for the source map path in the generated javascript file. This is correct. Closure, on the other hand, thinks that it's a file path, and uses java.nio.file.Path to look it up relative to the js file. This causes, for example, paths with spaces in them not to work at all, since the space will be represented as %20. This can be resolved by the following patch to closure:

Code: [Select]
--- a/src/com/google/javascript/jscomp/Compiler.java
+++ b/src/com/google/javascript/jscomp/Compiler.java
@@ -3030,6 +3030,11 @@ public class Compiler extends AbstractCompiler implements ErrorHandler, SourceFi
     String resultOriginalPath = result.getOriginalFile();
     final String relativePath;

+    if(resultOriginalPath.startsWith("file:///"))
+    {
+      resultOriginalPath = resultOriginalPath.substring("file:///".length());
+    }
+
     // Resolving the paths to a source file is expensive, so check the cache first.
     if (sourceMapOriginalPath.equals(resolvedSourceMap.originalPath)
         && resultOriginalPath.equals(resolvedSourceMap.sourceMapPath)) {
@@ -3040,7 +3045,7 @@ public class Compiler extends AbstractCompiler implements ErrorHandler, SourceFi
       if (source == null && !isNullOrEmpty(resultOriginalPath)) {
         source =
             SourceMapResolver.getRelativePath(
-                sourceMap.getOriginalPath(), result.getOriginalFile());
+                sourceMap.getOriginalPath(), resultOriginalPath);
         if (source != null) {
           sourceMapOriginalSources.putIfAbsent(relativePath, source);
         }

Second, absolute paths using the file:// protocol in sourcemap sources aren't handled correctly. Closure thinks that everything either starts with a / and is an absolute path, or it's a relative file path. Again, java.nio.file.Path is used, leading to possible errors like that reported by Krimm. This can be worked around with the following patch, but it's not particularly robust.

Code: [Select]
--- a/src/com/google/javascript/jscomp/Compiler.java
+++ b/src/com/google/javascript/jscomp/Compiler.java
@@ -3030,6 +3030,11 @@ public class Compiler extends AbstractCompiler implements ErrorHandler, SourceFi
     String resultOriginalPath = result.getOriginalFile();
     final String relativePath;

+    if(resultOriginalPath.startsWith("file:///"))
+    {
+      resultOriginalPath = resultOriginalPath.substring("file:///".length());
+    }
+
     // Resolving the paths to a source file is expensive, so check the cache first.
     if (sourceMapOriginalPath.equals(resolvedSourceMap.originalPath)
         && resultOriginalPath.equals(resolvedSourceMap.sourceMapPath)) {
@@ -3040,7 +3045,7 @@ public class Compiler extends AbstractCompiler implements ErrorHandler, SourceFi
       if (source == null && !isNullOrEmpty(resultOriginalPath)) {
         source =
             SourceMapResolver.getRelativePath(
-                sourceMap.getOriginalPath(), result.getOriginalFile());
+                sourceMap.getOriginalPath(), resultOriginalPath);
         if (source != null) {
           sourceMapOriginalSources.putIfAbsent(relativePath, source);
         }

The reason I never ran into this with my test game is that my typical test game has a space in the name, so I was running into issue #1, and closure never event attempted to resolve file paths in the first place.

However, if everything was working as intended (apart from this bug), I would expect that publishing an HTML5 game would always fail, but Krimm's later reports seem to indicate that the bugs occurrence is a bit hard to predict. I feel like there must be more bugs with closure's sourcemap processing feature, and I don't think I can afford the time to look into them.

In the end, I think I'll just remove sourcemap processing from the build in order to avoid this bug in the future.

29
Ask a Question / Re: iOS in app purchases issues
« on: September 06, 2022, 08:52:01 pm »
Is that the only place in the game where you set Bought to true or false? Are you using save/load game blocks (which could load the old value of Bought)? Alternatively, are you even sure that Bought is being set to true in the first place? You don't have any other code in your game that could be switching you back to the main screen? You may want to insert print blocks into your game and watch the logs to make sure that what you think is happening is actually happening. You can also print the value of the Bought attribute at key points.

It may be simpler to use the purchased product with id block for this.

30
Ask a Question / Re: Compile issue
« on: September 04, 2022, 10:24:37 pm »
I don't think this should affect it, but I can't think of anything else: disable the hxcpp compile cache and try again. You can find it at Tools > HXCPP Compile Cache Settings in the menu.

Pages: 1 2 3 4 ... 201