Are you still experiencing issues? I have requested additional assistance from a Tableau expert with the JS API to investigate since no one else has replied. It would be helpful to share any information that may have changed or been updated since you posted this.
Thanks for follow up. I'm still experiencing the issue. I would be happy to provide more details if something is unclear.
The way you wrote the snippet, it looks like you're calling showCustomViewAsync() synchronously after you call saveCustomViewAsync() so the saving likely has not completed on Server. You would need to call showCustomViewAsync() in the .then() block of saveCustomViewAsync() or at some interval later in time when you could guarantee that the saving had completed.
Although snippet looks like that, I'm waiting for the generation of the same and then calling the save. Tried the ` saveCustomViewAsync()` in `then` block of `rememberCustomViewAsync` and still facing the same problem.