serverless-trivia-game
serverless-trivia-game copied to clipboard
Some functions not working
Hi There,
Love the look of this project and it's serverless nature. I managed to deploy this last night and some of it seems to be working.
I have a webapp that takes registrations - and once registered users can log in.
I can't get the the core functions to work though - i.e. clicking on Manage, Run, Profile or Marketplace nothing happens. The Chat and Play buttons do appear to work though.
I don't think I had any errors at deployment time - I did notice a couple of things that were slightly different to the instructions, but I think I solved all of these?
Grateful for any suggestions - apologies I'm not much of a developer - so don't really know where to start.
Currently here if it helps: https://dev.dx88thgjf04k9.amplifyapp.com/
Thanks
Rich
Update - I've dug around looking at errors in the browser console. I think this is a CORS error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://j233r4j72m.execute-api.eu-west-1.amazonaws.com/prod/players/Rich. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 500.
Just not sure where I need to set the missing header?
Hey @biggerbananas - sorry for the absence there. I will take a look at this shortly!
Hi there - NP.
The distro is no longer live as I could not work out how to solve the CORS issue. Would be great to have a fix though as I'd love to have a play with this.
Happy to deploy it again if that helps.
On Thu, Jan 18, 2024 at 3:39 PM timjbruce @.***> wrote:
Hey @biggerbananas https://github.com/biggerbananas - sorry for the absence there. I will take a look at this shortly!
— Reply to this email directly, view it on GitHub https://github.com/aws-samples/serverless-trivia-game/issues/189#issuecomment-1898718413, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCKWTT4C6MVLDJJOVMMFNJ3YPE62ZAVCNFSM6AAAAABACO5T3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJYG4YTQNBRGM . You are receiving this because you were mentioned.Message ID: @.***>
Do you still have your AWSConfig.js file around? I think the issue might have been a mis-configuration on the httpapi setting. If it does not have a / at the end of it, it can result in what appears to be CORS issues. I'd also suggest trying to test the API GW instance in the console to see if it works, as well. I just redeployed from scratch over the weekend and did not run into any CORS issues.
Hi,
Thanks for coming back to me.
I have found the Awsconfig.js file - this is the httpapi line:
httpapi: 'https://j233r4j72m.execute-api.eu-west-1.amazonaws.com/prod/',
So I guess that is OK - I'll have a go at redeploying it and see if I get the same issue...
Thanks
Rich
On Mon, Jan 29, 2024 at 2:41 PM timjbruce @.***> wrote:
Do you still have your AWSConfig.js file around? I think the issue might have been a mis-configuration on the httpapi setting. If it does not have a / at the end of it, it can result in what appears to be CORS issues. I'd also suggest trying to test the API GW instance in the console to see if it works, as well. I just redeployed from scratch over the weekend and did not run into any CORS issues.
— Reply to this email directly, view it on GitHub https://github.com/aws-samples/serverless-trivia-game/issues/189#issuecomment-1914833121, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCKWTTY7WRJIAWAGCOXWD7DYQ6YLNAVCNFSM6AAAAABACO5T3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJUHAZTGMJSGE . You are receiving this because you were mentioned.Message ID: @.***>
Just checking to see if you had an update - that looks good and, if you do have the error, I'd like to get you to try something.
Hi thanks for checking in,
I have got it working - there was an error in the config file - can't remember exactly what I had done wrong - but it was my error, so thanks for pointing me in the right direction.
I have not had much time to test it yet - the main thing I would like to do is change the way players can access games. I'd like to be able to allow players to play a quiz without an account - like the various commercial quizzing and polling apps - i.e they have a url where they can supply a name and game code to register. I know there is a way to allow unauthenticated users with cognito pools - so hoping to look at implementing this soon.
On Tue, Mar 5, 2024 at 7:47 PM timjbruce @.***> wrote:
Just checking to see if you had an update - that looks good and, if you do have the error, I'd like to get you to try something.
— Reply to this email directly, view it on GitHub https://github.com/aws-samples/serverless-trivia-game/issues/189#issuecomment-1979513870, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCKWTT7WC5TGLG6PZYPW7R3YWYOMVAVCNFSM6AAAAABACO5T3KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZZGUYTGOBXGA . You are receiving this because you were mentioned.Message ID: @.***>
Issue with config file.