Roblox / roblox-blender-plugin

A Blender plugin to upload selected assets in Blender to Roblox using Roblox's Open Cloud API.
MIT License
114 stars 24 forks source link

"Add-on Error" during upload attempt #57

Open TheoriginalNeko opened 1 month ago

TheoriginalNeko commented 1 month ago

When I press upload it says in Upload Status Add-on error Screenshot 2024-08-13 162741

Nightriff commented 3 weeks ago

To get more details about this error, can you share the console output during the upload attempt?

Autonvilkku commented 3 weeks ago

FBX export starting... 'C:\\Users\\antti\\AppData\\Local\\Temp\\tmpl7tpebc7\\pistol.fbx'
export finished in 0.0000 sec.
Traceback (most recent call last):
  File "C:\Users\antti\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin\lib\upload_operator.py", line 243, in upload_task_complete
    operation = task.result()
                ^^^^^^^^^^^^^
  File "C:\Users\antti\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin\lib\upload_operator.py", line 190, in upload_task
    await oauth2_client.refresh_login_if_needed()
  File "C:\Users\antti\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin\lib\oauth2_client.py", line 245, in refresh_login_if_needed
    new_token_data = await self.__refresh_tokens(refresh_token)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\antti\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin\lib\oauth2_client.py", line 322, in __refresh_tokens
    raise exception
  File "C:\Users\antti\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin\lib\oauth2_client.py", line 316, in __refresh_tokens
    response.raise_for_status()  # Raises ClientResponseError or other ClientError
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\antti\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\roblox-blender-plugin\dependencies_public\aiohttp\client_reqrep.py", line 1011, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Token has been revoked', url=URL('https://apis.roblox.com/oauth/v1/token')

this is the console

TheoriginalNeko commented 3 weeks ago

@Nightriff and @Autonvilkku Here is the Terminal stuff:

Read prefs: "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\config\userpref.blend" Registered Power Sequencer with 72 modules Reloading external rigs... Reloading external metarigs... register_class(...): Info: Registering panel class: 'TEXTURE_PT_colors', bl_idname 'TEXTURE_PT_colors' has been registered before, unregistering previous register_class(...): Info: Registering operator class: 'OBJECT_OT_AlignOperator', bl_idname 'object.align' has been registered before, unregistering previous

To use POV centric workspaces you can set POV render option and save it with File > Defaults > Save Startup File menu Read blend: "C:\Users\Gamergodyt\OneDrive\Documents\untitled.blend" Traceback (most recent call last): File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\lib\oauth2_login_operators.py", line 81, in on_refresh_complete task.result() File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\lib\oauth2_client.py", line 245, in refresh_login_if_needed new_token_data = await self.refresh_tokens(refresh_token) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\lib\oauth2_client.py", line 322, in refresh_tokens raise exception File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\lib\oauth2_client.py", line 316, in refresh_tokens response.raise_for_status() # Raises ClientResponseError or other ClientError ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\dependencies_public\aiohttp\client_reqrep.py", line 1011, in raise_for_status raise ClientResponseError( aiohttp.client_exceptions.ClientResponseError: 400, message='Token has been revoked', url=URL('https://apis.roblox.com/oauth/v1/token') Traceback (most recent call last): File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\lib\upload_operator.py", line 156, in upload export_fbx(scene, view_layer, target_object, exported_file_path, add_on_preferences) File "C:\Users\Gamergodyt\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\roblox-blender-plugin\lib\export_fbx.py", line 61, in export_fbx bpy.ops.export_scene.fbx( File "C:\Program Files\Blender Foundation\Blender 4.1\4.1\scripts\modules\bpy\ops.py", line 109, in call__ ret = _op_call(self.idname_py(), kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: Calling operator "bpy.ops.export_scene.fbx" error, could not be found

Nightriff commented 3 weeks ago

The Token has been revoked error is related to login; the add-on goes to refresh your access token but Roblox's server says the refresh token was revoked, which happens after a fixed amount of time or when logging out. When encountering that error, the add-on should be re-prompting you to log in. Let me know if that didn't happen. In any case, you should be able to resolve that by logging out of the plugin and logging back in.

But I see a second error, bpy.ops.export_scene.fbx operator could not be found. That seems unusual, and is likely the cause of the "Add-on error" message you're seeing. I'm unfortunately not able to reproduce this using Blender 4.1.1 (I see you're also on 4.1).

Would you be able to take a screen recording of the upload process? I'm curious if there's anything unusual about your blender layout causing a wrong context to exist where the export_scene.fbx operator isn't available.

TheoriginalNeko commented 3 weeks ago

I can't take a screen recording can you tell me more about "blender layout causing a wrong context to exist where the export_scene.fbx operator isn't available." Because that might be somthing thats causing it.

TheoriginalNeko commented 3 weeks ago

Also I've tried to log out and log bag in before but it didn't do anything.

TheoriginalNeko commented 3 weeks ago

I fixed it!

Nightriff commented 2 weeks ago

@TheoriginalNeko I'm glad the issue was resolved for you. Did you figure out what fixed it, so that others who are experiencing this can also learn?