Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when loading conversations after updating to 17.0.0 #3099

Closed
Verequies opened this issue Jun 14, 2023 · 15 comments · Fixed by #3122
Closed

Crash when loading conversations after updating to 17.0.0 #3099

Verequies opened this issue Jun 14, 2023 · 15 comments · Fixed by #3122
Labels
3. to review Waiting for reviews bug Something isn't working
Milestone

Comments

@Verequies
Copy link

Verequies commented Jun 14, 2023

Steps to reproduce

Everyone on my team had their phones automatically updated to Talk 17.0.0 and subsequently could not use the app anymore.

Updated to Nextcloud 27 and Talk 17.0.0 for Android
Opened Talk for Android and select a conversation.
See that app crashes.

Expected behaviour

Able to view conversations without crashing.

Actual behaviour

Talk for Android crashes consistently.
Downgrading to 16.0.1 works fine.

Device brand and model

LG V30+

Android version

10

Nextcloud Talk app version

17.0.0

Nextcloud server version

27.0.0

Talk version

17.0.0

Custom Signaling server configured

No

Custom TURN server configured

None

Custom STUN server configured

None

Android logs

No response

Server log

No response

Additional information

No response

@Verequies Verequies added 0. Needs triage bug Something isn't working labels Jun 14, 2023
@mahibi
Copy link
Collaborator

mahibi commented Jun 14, 2023

Thanks for the report @Verequies !
This sounds like some config on this server cannot be handled.
Does it happen for every conversation or for specific ones?

Would you be willing to create a test account for me this server? If yes, please send the credentials to
marcel dot hibbe at nextcloud dot com

@Verequies
Copy link
Author

No problem. It happens for every conversation including "Talk updates".
Sure I've created a test account and sent through the details.

@marcelklehr
Copy link
Member

@Verequies Could you post a list of installed apps on your Nextcloud server?

@Verequies
Copy link
Author

After talking with @mahibi and narrowing it down to a translation support issue. I have determined that the OpenAI Integration is actually causing every single translation (even unsupported) to be returned in the capabilities endpoint.
I had not even had the translation app installed. Not exactly sure what about the OpenAI Integration is causing the issue but it is just enabled, not setup or connected to their API. Very strange

@Verequies
Copy link
Author

Perhaps to avoid this issue in future a check could be added to the Android app (if possible)?

@mahibi
Copy link
Collaborator

mahibi commented Jun 14, 2023

thanks @Verequies well done 👍 @SystemKeeper also found out it's the OpenAI app 😄

OpenAI is also filling the same translation config that the translate app is using. For now as a workaround it's also possible to continue to use OpenAI and just disabling it's translation feature:

grafik

So it seems i will have to find other ways how the Android Talk app can handle this amount of data..

@mahibi mahibi added this to the 17.1.0 milestone Jun 16, 2023
@delorean02
Copy link

Exact same errors on my ZFold4, downgrading to 16.0.1 produces the error, "Display name couldn't be fetched, aborting."
Turning off the translation setting in the OpenAI settings does resolve the issue in the 17.0.0 app. Thanks for posting!

@marcelklehr
Copy link
Member

cc @julien-nc

@mahibi
Copy link
Collaborator

mahibi commented Jun 19, 2023

just to summarize the problem for now: OpenAI sets the same capability translation attributes (spreed > config > chat > translations) like the translation feature.

see https://github.com/nextcloud/integration_openai/blob/615e1f6446789fce8104f4d3e9df525263fa6b5c/lib/AppInfo/Application.php#L61-L63

What happens when OpenAI is installed (and it's translate feature is enabled)

  • If the nextcloud translate app is also installed: Languages from both apps are available in the translate feature (but it's difficult to differentiate them via UI as enduser)

  • translations in web only work when selecting languages from the nextcloud translate app. OpenAI translations in web fail for me (also with API key):

server error log
{
  "reqId": "OnS6oh4OFfcpVowD9qvF",
  "level": 2,
  "time": "2023-06-19T11:35:12+00:00",
  "remoteAddr": "10.0.2.100",
  "user": "admin",
  "app": "no app in context",
  "method": "POST",
  "url": "/ocs/v2.php/translation/translate",
  "message": "Failed to translate from en to de",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0",
  "version": "28.0.0.0",
  "exception": {
    "Exception": "RuntimeException",
    "Message": "Failed translate from English (US) to Deutsch (Persönlich: Du)",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/Translation/TranslationManager.php",
        "line": 89,
        "function": "translate",
        "class": "OCA\\OpenAi\\Translation\\TranslationProvider",
        "type": "->"
      },
      {
        "file": "/var/www/html/core/Controller/TranslationApiController.php",
        "line": 71,
        "function": "translate",
        "class": "OC\\Translation\\TranslationManager",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 230,
        "function": "translate",
        "class": "OC\\Core\\Controller\\TranslationApiController",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 137,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/html/ocs/v1.php",
        "line": 64,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/html/ocs/v2.php",
        "line": 23,
        "args": [
          "/var/www/html/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/apps/integration_openai/lib/Translation/TranslationProvider.php",
    "Line": 140,
    "message": "Failed to translate from en to de",
    "exception": {},
    "CustomMessage": "Failed to translate from en to de"
  }
}
  • Talk android app crashes (when opening a chat) whenever OpenAI translations are enabled.

What happens when OpenAI is disabled or at least it's translation feature (but Nextcloud translate is is enabled)

  • translations work (both in web and android talk app)

Why does the android talk app crash when OpenAI translation is enabled?

  • the capabilities contain all the translation combinations (which is quite much when OpenAI translation is enabled)
  • these capabilities are saved in currentUser in the talk android app
  • currentUser is passed as extra bundle in ConversationsListActivity to ChatActivity. This is too much data, the app will crash or throw this error:
TransactionTooLargeException
Exception java.lang.RuntimeException: Failure from system
  at android.app.Instrumentation.execStartActivity (Instrumentation.java:1739)
  at android.app.Activity.startActivityForResult (Activity.java:5445)
  at androidx.activity.ComponentActivity.startActivityForResult (ComponentActivity.java:728)
  at android.app.Activity.startActivityForResult (Activity.java:5395)
  at androidx.activity.ComponentActivity.startActivityForResult (ComponentActivity.java:709)
  at android.app.Activity.startActivity (Activity.java:5797)
  at android.app.Activity.startActivity (Activity.java:5750)
  at com.nextcloud.talk.conversationlist.ConversationsListActivity.openConversation (ConversationsListActivity.kt:1152)
  at com.nextcloud.talk.conversationlist.ConversationsListActivity.openConversation$default (ConversationsListActivity.kt:1127)
  at com.nextcloud.talk.conversationlist.ConversationsListActivity.handleConversation (ConversationsListActivity.kt:943)
  at com.nextcloud.talk.conversationlist.ConversationsListActivity.onItemClick (ConversationsListActivity.kt:904)
  at eu.davidea.viewholders.FlexibleViewHolder.onClick (FlexibleViewHolder.java:122)
  at android.view.View.performClick (View.java:7509)
  at android.view.View.performClickInternal (View.java:7486)
  at android.view.View.access$3600 (View.java:841)
  at android.view.View$PerformClick.run (View.java:28720)
  at android.os.Handler.handleCallback (Handler.java:938)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:236)
  at android.app.ActivityThread.main (ActivityThread.java:8056)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:656)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:967)
Caused by android.os.TransactionTooLargeException:
  at android.os.BinderProxy.transactNative
  at android.os.BinderProxy.transact (BinderProxy.java:540)
  at android.app.IActivityTaskManager$Stub$Proxy.startActivity (IActivityTaskManager.java:3935)
  at android.app.Instrumentation.execStartActivity (Instrumentation.java:1733)

workaround for now

disable OpenAI or at least it's translation feature

questions

  1. should OpenAI set the same capabilitiy translation attributes as the nextcloud translate app?
  2. so is it okay that the capabilities answer is so huge? (--> then the android app has to handle it)
  3. Any idea why OpenAI translation fails (for me)?

cc @nickvergessen

@marcelklehr
Copy link
Member

should OpenAI set the same capabilitiy translation attributes as the nextcloud translate app?

Yes, as it is a translation provider (not sure why it doesn't work, that should probably be a bug report on integration_openai repo)

so is it okay that the capabilities answer is so huge?

Yes.

@nickvergessen
Copy link
Member

should OpenAI set the same capabilitiy translation attributes as the nextcloud translate app?

Yes it should. But maybe it could only populate options it can really translate (is it known?)

so is it okay that the capabilities answer is so huge?

Capabilities are checked not too regularly IIRC, but it shouldn't be too big never the less.
This was also one of my fear points back then where I wondered whether we should put them into capabilities or whether we read them from the API instead.

We could remove the capability and replace it with a boolean and then you read the list from https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-translation-api.html#get-available-translation-options

How big is the list with openai? MBs?

@mahibi
Copy link
Collaborator

mahibi commented Jun 19, 2023

How big is the list with openai? MBs?

without OpenAI translation: ~ 11.7KB
with OpenAI translation: ~ 1.4 MB

So with OpenAI translations i run into the issue that parcelables and bundles are not suitable to pass this data between activities

@ETLin
Copy link

ETLin commented Jun 27, 2023

got same issue. It's would work fine after closed openai service.

@muchachagrande
Copy link

muchachagrande commented Jun 30, 2023

Just for the record. I've got this issue today and I can confirm that it is also happening with the Libre Translate plugin installed because Libre Translate offers many languages as source and destination the possible combinations list is huge.

Edit:
Tried Translate plugin which has only five languages and it works fine. The only downside is that it doesn't detect the source language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants