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.

translate.get(...).flatMap(...) not working in pending state

See original GitHub issue

I’m submitting a … (check one with “x”)

[x] bug report => check the FAQ and search github for a similar issue or PR before submitting
[x] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request

Not sure if it’s a bug or misuse by me…

Current behavior Using translate.get('...').flatMap(...).subscribe(observer) does not work if this.pending is set.

Expected/desired behavior The observer gets called with the translation.

Reproduction of the problem Made a small plunker. Calling doIt() from ngOnInit() does not work, calling it afterwards works just fine. Although I didn’t dig too deep it looks like to be caused by this.pending.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
imgx64commented, Nov 6, 2016

Ok, I found the root issue. getTranslation was using share() which was creating a hot observable, and then immediately subscribing to it. Once this subscription was done, the pending observable stopped because there are no more subscribers. Any subscribers afterwards were ignored.

0reactions
ocombecommented, Nov 20, 2016

Thanks a lot for taking the time to find another solution and submitting a PR, I’ve merged it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

swift - Cannot map error after flatMap usage (Never result type)
Problem is in getData function where in MapError pipeline I am getting: Cannot convert value of type () to closure result type Never....
Read more >
reactor/reactor - Gitter
hi, i have stupid problem. I don't know how to add the mono contents into the subscriber context. e.g. Mono.just("val").map(v -> {addToCtx(v); return...
Read more >
Part 2: Processing Data with Java SE 8 Streams - Oracle
We can fix this problem by using a flatMap , as shown in Listing 7. Using the flatMap method has the effect of...
Read more >
Introduction to Future in Vavr - Baeldung
Get started with Spring 5 and Spring Boot 2, through the Learn Spring course: ... The Future can be in one of two...
Read more >
Reactor 3 Reference Guide
All of Reactor is open source, including this documentation. If you find problems with the docs or if you want to improve them,...
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