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.

Exception returning UnicastSubject Observable from flow

See original GitHub issue

To Reproduce

Create the following flow: @StartableByRPC class ObservableSubject(val unicast: Boolean) : FlowLogic<rx.Observable<Int>>() { override fun call(): rx.Observable<Int> { val o: rx.Observable<Int> = if (unicast) UnicastSubject.create() else PublishSubject.create() return o } }

And the following driver test: @Test fun unicastSujectTest() = driver(driverParameters) { val handle = startNode().getOrThrow() val observable = handle.rpc.startFlow(DataFeedFlow::ObservableSubject, **true**).returnValue.get() observable.subscribe().unsubscribe() println("string: $observable") }

When the test is with unicast=false the test completes without failure. When run with unicast=true (as above) the test fails with the stack trace included in the comment below.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

r3jirabotcommented, May 22, 2020

Automatically created Jira issue: CORDA-3815

simonmaxen-dacommented, Feb 9, 2021

Screenshot 2021-02-09 at 11 22 01 Hi @rick-r3, thanks for taking a look.

Maybe the Observables section should be moved to somewhere under Contributing -> Participating ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

From RxJava to Kotlin Flow: Error Handling
Comparing Error Handling in RxJava and Kotlin Flow ... and Observable, which emit a value and then throw an exception. ... return flow...
Read more >
Observer (RxJava Javadoc 3.0.0-RC4)
If the flow is synchronous, the ObservableSource.subscribe(Observer) throws instead of returning normally. If the flow is asynchronous, the exception ...
Read more >
Are Kotlin Coroutines Enough to Replace RxJava?
The main reason why Flow is enough to replace both the Observable and ... to pass a return value and a method onError...
Read more >
Observable | RXJava 2.1.1 - Srcrr
Returns an Observable that emits the same values as the source ObservableSource with the exception of an onComplete . final <R> Observable<R> ...
Read more >
io.reactivex.Observable java code examples
@Override public Object apply(Observable<Integer> o) throws Exception { return Observable.just(1).window(o).flatMap(new Function<Observable<Integer>, ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found