Skip to content

Translate Note: Error when Note without text, just media (works in Misskey Web) #783

@StarWolf3000

Description

@StarWolf3000

💡 Summary

If a note only has media without any message text, tapping the "Translate" icon will throw the following error:
type 'String' is not a subtype of type 'FutureOr<Map<String, dynamic>>'

Stacktrace:

#0 ApiService.post (package:misskey_dart/src/servicesapi_service.dart:39 <asynchronous suspension>
#1 MisskeyNotes.translate (package:misskey_dart/src/misskey_note.dart:217) <asynchronous suspension>
#2 FutureHandlerProviderElementMixin.handleFuture.<anonymous closure>.<anonymous closure> (package:riverpod/src/async_notifier/base.dart:355) <asynchronous suspension>

Doing the same in Misskey Web (using context menu -> Translate) will do nothing.

I have provided a note on our server you can use to test this (translate is not available for guest access, only logged in, so you might have to try this from your own remote account): https://kitsune.moe/notes/agt4z30l5z

🥰 Expected Behavior

Either do nothing (like in Misskey Web), or show an alert/info panel, that the note does not contain any text to translate.

🤬 Actual Behavior

Tapping the "Translate" icon throws the error mentioned under "Summary".

📝 Steps to Reproduce

  1. Have the latest app installed (I have Android).
  2. Have it connected to an instance that supports translation (mine is kitsune.moe, which has the translation enabled).
  3. Create or tap on a note that only contains media, no text (text includes urls, hashtags and emojis).
  4. Tap the translate button.

💻 Environment

* Model and OS of the device(s): Redmi Note 9 Pro, Android 11
* Aria: 1.3.10+79
* Server URL: https://kitsune.moe
* Misskey: 2025.8.0

Do you want to address this bug yourself?

  • Yes, I will patch the bug myself and send a pull request

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions