IamKingWaiMark / FBP

Firebase Plugin for Unreal Engine
2 stars 0 forks source link

Editor Crashes on Sign in with Username and Password Fail #1

Closed WeeTomatoBall closed 1 year ago

WeeTomatoBall commented 1 year ago

Binded an event to the fail of the Sign in with Username and Password. The editor crashes if I add a delay anywhere after it. image image Edit: Same thing happens for success.

IamKingWaiMark commented 1 year ago

Hi, did you try binding both events and compile?

WeeTomatoBall commented 1 year ago

Yes, both events are binded and it has been compiled. It crashes when any event or function containing a delay is executed.

WeeTomatoBall commented 1 year ago

Can you replicate this? Steps are to use the sign in with email and password node, and out of the binded events use a delay of some sort. I'm not sure if this is only happening to me, btw my version is 5.0

IamKingWaiMark commented 1 year ago

From your 2nd image,

The SignInFailed event is wrong at the bottom. Are you referring to that or the one that is connected?

Also used the Retriggerable Delay node and it still works fine on 5.0.

image

IamKingWaiMark commented 1 year ago

Also check this post to see how to add the events:

https://codeible.com/view/videotutorial/MghD5KMFo7hLKvsHTug7;title=Auth%20-%20Sign%20In

WeeTomatoBall commented 1 year ago

Yes, I added the events correcty, and still, it crashes whenever there was a delay. Setting my nodes to look exactly like yours in the screenshot, it still crashes.

IamKingWaiMark commented 1 year ago

The Sign In With Email and Password node should be fine since you said it works without using delay.

Using a delay in the callback does not affect the node, I think you should:

1) Check the nodes after the delay

or

2) Repair the engine files by verifying the files or reinstall/update

image

WeeTomatoBall commented 1 year ago
  1. Even with nothing after the delay, it crashes, the delay alone causes the crash.
  2. Verifying and reinstalling has not had an effect

But I checked the logs and I found these errors right before the engine crashes (without a crash message) LogJson: Warning: Field firebase_url was not found. LogJson: Error: Json Value of type 'Null' used as a 'String'.

IamKingWaiMark commented 1 year ago

Are you using Windows or Mac?

If you are using Windows, you need to download the Google-Services.json file from the Firebase Console and add it to your root directory for the project.

Then you need to go to the Project Settings > Android (under Platforms) > Click on the Configure Now button

image

If you are using the Mac, you need to download the GoogleServices-info.plist file and put that file in the root folder.

IamKingWaiMark commented 1 year ago

Also make sure you enable Firestore or Realtime Database to generate a full Google Services file.

WeeTomatoBall commented 1 year ago

I've enabled Realtime Database, I've added the file, I'm using Windows, I've configured the settings. I'm not quite sure what else could be going wrong.

WeeTomatoBall commented 1 year ago

Is the package name important? Its just package.name right now.

IamKingWaiMark commented 1 year ago

Nope, the package name does not matter.

Did you enable Realtime Time Database just now? You will need to download a new Google-Services.json file.

Here is a sample google-services.json file that you can try:

https://drive.google.com/file/d/1muOnoIfVP7-eXfu64igrR0Tjy2yQ04Hk/view?usp=sharing

I made a video on how to setup the plugin:

https://www.youtube.com/watch?v=CH0p2kNH99s

WeeTomatoBall commented 1 year ago

Yes, I had replaced the json file, and double checking your video, I have done the setup correctly. Comparing the json you attached to my json file, it appears that the format is correct, though my ID has no numbers (racing---pod-labs) does the ID matter?

WeeTomatoBall commented 1 year ago

However, I just noticed that completing the same test in my level blueprint, everything works fine, the delay does not crash the editor. image For some reason, it is only this same code in the widget that causes the crash. Does this happen in your widgets as well?

IamKingWaiMark commented 1 year ago

Nope, it works for me.

Sample

WeeTomatoBall commented 1 year ago

No, that is your level blueprint, can you do the same thing in a widget blueprint? I am trying to use the Plugin to create a leaderboard in my main menu, on the main menu widget, I simply add the widget in the level bp.

IamKingWaiMark commented 1 year ago

Oh, ok I know what you mean now.

You cannot call the plugin functions inside Widget Blueprints.

The way to handle that is to create a function inside the Widget Blueprint and then call it to change or updates the values inside.

image

WeeTomatoBall commented 1 year ago

Ah ok thank you.

WeeTomatoBall commented 1 year ago

Actually this didnt solve it. I made an actor to handle the firebase events, which I spawn on beginplay. When the sign in button is pressed, the event in the actor is called, which calls the event in the widget on fail. The delay still crashes the editor. image image

WeeTomatoBall commented 1 year ago

Well, actually if I put the delay in the actor rather than the widget it works. Thats odd.

IamKingWaiMark commented 1 year ago

Pretty interesting.

Could be something weird on how Unreal Handles Async functions and delays in widgets.