farcaster-py icon indicating copy to clipboard operation
farcaster-py copied to clipboard

cast created with post_cast disappears after 24h

Open gabrielfior opened this issue 9 months ago • 1 comments

🐛 Bug Report

The method post_cast creates a cast, however it disappears after a given period of time (24h).

🔬 How To Reproduce

Steps to reproduce the behavior:

# farcaster = "^0.7.11"
c2 = Warpcast(private_key="MY-PRIVATE-KEY")
cast = c2.post_cast("test cast")
cast_hash = cast.cast.hash
print (f"cast_hash {cast_hash}")
# ... Wait 24h
c2 = Warpcast(private_key="MY-PRIVATE-KEY")
cast = c2.get_cast(cast_hash)
$ Error
    c2.get_cast(cast.cast.hash)
  File "/home/gabrielfior/miniconda3/envs/PMA/lib/python3.10/site-packages/farcaster/client.py", line 338, in get_cast
    response = self._get(
  File "/home/gabrielfior/miniconda3/envs/PMA/lib/python3.10/site-packages/farcaster/client.py", line 89, in _get
    raise Exception(response["errors"])  # pragma: no cover
Exception: [{'message': 'Cast 0xabdea1ff98521bef0c1f5e24ef0461ae21d91805 does not exist'}]

For example, the post with hash 0xabdea1ff98521bef0c1f5e24ef0461ae21d91805 was created 1 day ago and now it doesn't exist anymore.

Code sample

See above

Environment

  • OS - Linux (Ubuntu)
  • Python version - Python 3.10.14

Screenshots

📈 Expected behavior

I expected the cast to be stored permanently and be available for later retrieval.

gabrielfior avatar May 07 '24 18:05 gabrielfior

get_cast don't work rn(probably they changed endpoint url). you should try to access your cast by hubble https://docs.farcaster.xyz/reference/hubble/httpapi/casts

butulkus avatar Jul 06 '24 10:07 butulkus