You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Workspace - No error message and red dot displayed for failed workspace #12132
Click/tap on the green plus button (FAB) and create a new Workspace
Navigate to Workspace settings
Verify the settings are grayed out indicating the workspace is pending to be created
Verify the default workspace rooms are created and are visible in LHN
Refresh the page or force-kill and relaunch the app
Enable the internet connection in the device
Expected Result:
This account has policy creation disabled. When trying to create a policy when offline, the process should fail and an error state should be triggered, in this case the Workspace should not be created and a red dot should appear in the profile icon.
Actual Result:
The workspace isn't created but the user does not receive an error message and no red dot is shown on the profile icon.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
The reproduction steps are a bit odd to me. If we create a workspace while offline and then kill the app before going back online, will the request still get sent?
@neil-marcellini Now that I can test policy disabled locally, I'm actually not seeing this - however, maybe it's still an issue... It seems like I can still create chats offline and it works fine (so no behavior like is shown in the video, but also no error at all). Let me know what you're seeing on your end!
EDIT - Disregard, I was trying "New Chat" not "New Workspace" - seeing the same as you.
Oh right the requests are persisted even if you kill the app. It looks like the CreateWorkspace command is returning an error message but it's not in an onyx update format.
We don't set any kind of generic error message in the failure data for creating the workspace here. In fact we actually delete the optimistic policy, which is not desirable if we want to show a RBR leading to the error.
Why would this not be reproducible on prod? You can have an account with disabled policy creation on prod, and you can sign in and try creating a workspace. I'll see if I can reproduce it on prod now. If so then it's not a deploy blocker. Either way, this is an obscure case that we didn't plan for, so I don't think it should be a blocker.
So I just tried testing this again - I think I either found another bug, or expanded this one. I am still seeing this particular bug on production, but I also tried creating a workspace while being online, and saw pretty much the same behavior - the chats appear for a split second and then disappear, no RBR or any error shown. Also see a 404 in the console, which is I think trying to get the report that doesn't exist..
@kbecciv do you happen to know what's expected behavior here while online (and if you could confirm what I'm seeing if you have time, that would be great too!)
I recommend looking at the CreateWorkspace api command in Web-E. Try out the behavior for another type of failure. We need to return the data for this error in the same way as the others, within the onyxData.
After some further testing, i think this is actually now working as expected (it IS different from the initial videos above) but I'm not sure if "as expected" is ideal. It DOES show an RBR, but it shows up next to the user avatar so it's a bit hard to notice (that's why I missed it). I'm happy to close this for now and revisit later, though, since it might be a larger discussion on where that RBR should go. Unless you disagree!
Activity
kbecciv commentedon Oct 25, 2022
Issue is reproduced in all environment, please attach the link for TR https://expensify.testrail.io/index.php?/tests/view/2900726&group_by=cases:section_id&group_order=asc&group_id=229065
OSBotify commentedon Oct 25, 2022
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
StagingDeployCashdeploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:melvin-bot commentedon Oct 25, 2022
Triggered auto assignment to @dangrous (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.dangrous commentedon Oct 25, 2022
This is pretty likely to be something due to #11439 - looking into it. cc @stitesExpensify and @tylerkaraszewski in case you happen to have any insight.
dangrous commentedon Oct 25, 2022
Are we missing failureData here: https://github.com/Expensify/App/pull/11439/files#diff-8afe5b71ee0436c21364148c86dadd640f2bff3e3d916addbb1f1f6f7e5b6a43R698 ? That is, if it can't open the report does it just remove everything, rather than displaying it with an error message?
neil-marcellini commentedon Oct 26, 2022
The reproduction steps are a bit odd to me. If we create a workspace while offline and then kill the app before going back online, will the request still get sent?
neil-marcellini commentedon Oct 26, 2022
Here's how to disable policy creation. I'm going to try to reproduce this on dev and play around with it.
dangrous commentedon Oct 26, 2022
@neil-marcellini Now that I can test policy disabled locally, I'm actually not seeing this - however, maybe it's still an issue... It seems like I can still create chats offline and it works fine (so no behavior like is shown in the video, but also no error at all). Let me know what you're seeing on your end!
EDIT - Disregard, I was trying "New Chat" not "New Workspace" - seeing the same as you.
neil-marcellini commentedon Oct 26, 2022
Oh right the requests are persisted even if you kill the app. It looks like the

CreateWorkspacecommand is returning an error message but it's not in an onyx update format.We don't set any kind of generic error message in the failure data for creating the workspace here. In fact we actually delete the optimistic policy, which is not desirable if we want to show a RBR leading to the error.
neil-marcellini commentedon Oct 26, 2022
Why would this not be reproducible on prod? You can have an account with disabled policy creation on prod, and you can sign in and try creating a workspace. I'll see if I can reproduce it on prod now. If so then it's not a deploy blocker. Either way, this is an obscure case that we didn't plan for, so I don't think it should be a blocker.
8 remaining items
dangrous commentedon Oct 31, 2022
That PR is now on production, haven't had time to see if this still happens yet but hopefully today or tomorrow.
stitesExpensify commentedon Oct 31, 2022
I don't think so since that was focused on creating chats, not workspaces (which uses a different API call)
dangrous commentedon Nov 2, 2022
Yep, I realized after writing that that I think I got my wires crossed. Good to have that confirmed in writing in the history though, thank you!
dangrous commentedon Nov 2, 2022
So I just tried testing this again - I think I either found another bug, or expanded this one. I am still seeing this particular bug on production, but I also tried creating a workspace while being online, and saw pretty much the same behavior - the chats appear for a split second and then disappear, no RBR or any error shown. Also see a 404 in the console, which is I think trying to get the report that doesn't exist..
@kbecciv do you happen to know what's expected behavior here while online (and if you could confirm what I'm seeing if you have time, that would be great too!)
neil-marcellini commentedon Nov 2, 2022
I recommend looking at the
CreateWorkspaceapi command in Web-E. Try out the behavior for another type of failure. We need to return the data for this error in the same way as the others, within theonyxData.dangrous commentedon Nov 4, 2022
After some further testing, i think this is actually now working as expected (it IS different from the initial videos above) but I'm not sure if "as expected" is ideal. It DOES show an RBR, but it shows up next to the user avatar so it's a bit hard to notice (that's why I missed it). I'm happy to close this for now and revisit later, though, since it might be a larger discussion on where that RBR should go. Unless you disagree!
2022-11-04_16-12-41.mp4
neil-marcellini commentedon Nov 7, 2022
That looks perfect to me.
dangrous commentedon Nov 7, 2022
Great! I'll close this then