question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Activity loses it's properties onTurnError

See original GitHub issue

Github issues should be used for bugs and feature requests. Use Stack Overflow for general “how-to” questions.

Version

What package version of the SDK are you using. 4.14.2

Describe the bug

final Activity activity = MessageFactory.text( "Test" );
activity.setProperties( "key", JsonNodeFactory.instance.textNode( "test" ) );

...
setOnTurnError( ( turnContext, exception ) -> {
    final Activity activity = turnContext.getActivity();

    LoggerFactory.getLogger( AdapterWithErrorHandler.class ).error( "onTurnError", exception );

    System.out.println( exception );

    return null;
} );

If I create an activity and give it a property on the onTurnError this property is no longer present.

If I put the same property inside the Conversation, the value isn’t lost.

To Reproduce

Steps to reproduce the behavior: See example above.

Expected behavior

The activity properties should be present

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
esfomeadocommented, May 19, 2022
0reactions
gabogcommented, Jun 2, 2022

The conversation object in the conversation property of the activity will be also be updated on the way out by the underlying framework infrastructure.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OnTurnError function inside DefaultAdapter doesn't end the ...
I need access to the turnContext (which I have) but also the collection of dialogs which make up the current dialog stack via...
Read more >
The activity lifecycle | Android Developers
Crashing or losing the user's progress when the screen rotates between landscape and portrait orientation. This document explains the activity ...
Read more >
4. The Activity Lifecycle: Being an Activity - Head First Android ...
If the activity moves into the foreground again, the onResume() method gets called. The activity may go through this cycle many times if...
Read more >
Add trace activities to your bot in Bot Framework SDK
To use a trace activity · Create a new activity. Set its required type property to "trace". · Use the turn context object's...
Read more >
Is it okay to access activity's properties and functions from ...
Now looking at your code, I can see you have a fragment system that is based on values/functions stored in the main activity,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found