root-systems / cobuy

:seedling: :package: :stew: :family: Helping people buy good food at good prices, together.
GNU Affero General Public License v3.0
25 stars 4 forks source link

newly created order not showing up #346

Open gregorykan opened 6 years ago

gregorykan commented 6 years ago
ahdinosaur commented 6 years ago

hmm, i couldn't reproduce?

gregorykan commented 6 years ago

conditions isolated - leftover state residue locally?

  1. i registered a new account, fresh db
  2. i created an order
  3. it all worked fine
  4. i registered a second account
  5. i created an order
  6. it did not appear

note the two order objects in the screenshot below. order id 2 was actually created by agent id 4, however it shows up as belonging to agent id 1 (adminAgentId),

Screen Shot 2017-12-20 at 5.44.04 PM.png

ahdinosaur commented 6 years ago

reproduced!

ahdinosaur commented 6 years ago

not fixed by #348

this means it's probably an issue with the feathers websocket connection, as in it keeps the authentication token from the previous logged in user, which means the new order is created as if it were from the old user.

ahdinosaur commented 6 years ago

or we're somewhere storing state in the epic: https://github.com/root-systems/dogstack-agents/blob/master/authentication/epic.js. but i can't find anything, either server or epic.