Unable to submit entry for One Button Hack contest
minihackContest.validate
Validating /MATLAB Drive/game.m ...
OK: game() returns a scalar struct.
OK: init, update, render are function handles.
OK: 9751 chars (limit 10000, comments excluded).
OK: no banned functions.
Validation passed.
minihackContest.submit
Title (1-80 chars): ThreeBodyProblemEjector
Publish "ThreeBodyProblemEjector" to contest? [y/N] y
Submitting your entry...
This can take some time - please keep MATLAB open until it finishes.
Submission failed: HTTP 500
Something went wrong. Please try again in a moment.
unsure what to do as runs on matlab online, on matlab22b
8 Comments
Time Descendingthe submit i think would work now but its not accepting - was up to 3:15PM AEST Timer is not accurate.
minihackContest.submit
Warning: Live contest rules unavailable (unexpected status 404 from https://www.mathworks.com/matlabcentral/communitycontests/api/v1/contests/current/rules_meta).
Skipping the character limit and banned-function checks — the server still checks them when you submit.
> In fetchContestRules>noRules (line 70)
In fetchContestRules (line 42)
In minihackContest.submit (line 31)
Title (1-80 chars): ThreeBodyEjectionGame
Publish "ThreeBodyEjectionGame" to contest? [y/N] y
Submitting your entry...
This can take some time - please keep MATLAB open until it finishes.
Submission failed: HTTP 409
no game contest is currently accepting entries


its the 30th where i am, and the page has.... I'll try to fix the game today but unsure if i can

@Vinay Ramesh, a MathWorks Engineer replied on your thread. If you still having issues, there are still few things to check, not a diagnosis:
- initState is defined inside game.m, spelled and capitialized exactly as in g.init=@initState.
- You are not relying on a seperate initState.m in your folder or path. Only game.m is submitted, so that would work for you.
In the Command Window (not inside game.m, since which is banned in enteries), with the folder containing game.m as your current folder, run:
which initState in game
which initState -all
The first should report a local function of game. If it prints nothing, initState is not defined in game.m. The second lists any other file with that name that could be hiding the problem on your computer.
Then run
clear game
validate again, and try minihackContest.play. The starter says play runs your game locally, so a problem with initState may show up there too.
The contest ends tonight at 11:59PM, if it sill fails, reply on your thread with what the two which commands print and Vinay can help from there.
I hope you get your entry in and earn the One button Game badge. Good luck 👍 again!
Hi @Michelle Were you able to run the game locally or online? It seems like the preview rendering is failing upon submission because of the following error.
Undefined function 'initState' for input arguments of type 'matlab.graphics.axis.Axes'
I understand this should have been caught on client side validation but hope this helps to troubleshoot and successfully submit yoir entry.
Sorry to hear about what happened. After reading your post carefully, it is obvious that the error appears to be on the upload step. Also, I checked that Mathworks status page currently shows All Systems Operational with no incidents today. So, this is what I would suggest you do today since the contest ends today.
- Keep retrying minihackContest.submit every few minutes in case it is temporary.
- Submit a request at Mathworks Support and include the exact error text, the date, time and time zone, that you are on Matlab Online R2022b, and that validation passed. Ask for an extension or a manual way to submit.
- Keep a saved copy of your validated game.m (in MATLAB Drive and on your computer) so that can send it directly if they ask.
I hope Mathworks sorts this out quickly and that you get full credit for your entry, including the One-button Game badge.
Good luck, and please post here if you hear back so others with the same problem can see the outcome.
Sign in to participate