Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENG-4194] TypeError: Cannot create property 'token' on string #4534

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion reflex/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ async def process(
await asyncio.create_task(
app.event_namespace.emit(
"reload",
data=format.json_dumps(event),
data=event,
to=sid,
)
)
Expand Down
9 changes: 4 additions & 5 deletions tests/integration/test_client_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,7 @@ async def poll_for_not_hydrated():
assert await AppHarness._poll_for_async(poll_for_not_hydrated)

# Trigger event to get a new instance of the state since the old was expired.
state_var_input = driver.find_element(By.ID, "state_var")
state_var_input.send_keys("re-triggering")
set_sub("c1", "c1 post expire")

# get new references to all cookie and local storage elements (again)
c1 = driver.find_element(By.ID, "c1")
Expand All @@ -659,7 +658,7 @@ async def poll_for_not_hydrated():
l1s = driver.find_element(By.ID, "l1s")
s1s = driver.find_element(By.ID, "s1s")

assert c1.text == "c1 value"
assert c1.text == "c1 post expire"
assert c2.text == "c2 value"
assert c3.text == "" # temporary cookie expired after reset state!
assert c4.text == "c4 value"
Expand Down Expand Up @@ -690,11 +689,11 @@ async def get_sub_state():

async def poll_for_c1_set():
sub_state = await get_sub_state()
return sub_state.c1 == "c1 value"
return sub_state.c1 == "c1 post expire"

assert await AppHarness._poll_for_async(poll_for_c1_set)
sub_state = await get_sub_state()
assert sub_state.c1 == "c1 value"
assert sub_state.c1 == "c1 post expire"
assert sub_state.c2 == "c2 value"
assert sub_state.c3 == ""
assert sub_state.c4 == "c4 value"
Expand Down
Loading