Open hoching87 opened 3 months ago
Is this the exact code you used? You didn't add a storage adapter or anything before deployment?
This is just some sample code I was try with to test and see if it was really the conversation plugin that was faulty. I had been using the plugin and was working fine until now. I am not sure what the problems was or what had changed but removing the conversation plugin seem to be the fix.
I had try to add some storage adapter and it still not working. I tested with both Supabase and RAM adapter.
const storage = supabaseAdapter({
supabase,
table: "bot_session", // table name
});
// Install the session plugin.
bot.use(session({
initial() {
// return empty object for now
return {};
},
storage,
// storage: new MemorySessionStorage(),
}));
I'll take that as a yes. Does that same code work locally?
I have exactly the same issue. Script above pasted by @hoching87 works fine if you run it locally with deno, but not on supabase (supabase also has local development setup).
Simply running it with deno run --allow-read --allow-write --allow-env --allow-net --allow-run scripts/test.ts
works.
Having said that there is still a type mismatch after new grammy version.
Simply installing the plugin on Supabase will cause it to load indefinitely on each request and throw no error. It was working before until recently I think.
Sample code for reproduction :