bard-ai icon indicating copy to clipboard operation
bard-ai copied to clipboard

🐛 [BUG]: TypeError: Cannot read properties of null (reading '4')

Open eliiran1231 opened this issue 2 years ago • 4 comments

Prerequisites

  • [X] I have searched the issues and believe that it has not already been reported
  • [X] It occurs on the latest version of bard-ai
  • [X] I have read the FAQ and there are no solutions there

Bug Description

sometimes i get this error while talking to bard, after some digging, turns out that the variable chatData is null sometimes due to a problem in the parsing from json. here is the full error:

TypeError: Cannot read properties of null (reading '4') at #query (file:///C:/Users/mma91/OneDrive/%D7%A9%D7%95%D7%9C%D7%97%D7%9F%20%D7%94%D7%A2%D7%91%D7%95%D7%93%D7%94/milki/node_modules/bard-ai/index.js:240:32) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Chat.ask (file:///C:/Users/mma91/OneDrive/%D7%A9%D7%95%D7%9C%D7%97%D7%9F%20%D7%94%D7%A2%D7%91%D7%95%D7%93%D7%94/milki/node_modules/bard-ai/index.js:353:32) at async bardAI (file:///C:/Users/mma91/OneDrive/%D7%A9%D7%95%D7%9C%D7%97%D7%9F%20%D7%94%D7%A2%D7%91%D7%95%D7%93%D7%94/milki/index.js:53:22) at async file:///C:/Users/mma91/OneDrive/%D7%A9%D7%95%D7%9C%D7%97%D7%9F%20%D7%94%D7%A2%D7%91%D7%95%D7%93%D7%94/milki/index.js:115:32

Reproduction Steps

talk to bard for a while, i did notice it tends happen more in the evening

Other information

No response

Occurance Rate

I can reproduce this bug 60% of the time.

eliiran1231 avatar Aug 28 '23 20:08 eliiran1231

Possible duplicate of #53

ThatXliner avatar Aug 29 '23 02:08 ThatXliner

Possible duplicate of #53

bard is available in my country and i use the latest verison

eliiran1231 avatar Aug 30 '23 03:08 eliiran1231

Are you using the __Secure-1PSIDTS cookie as well? See docs here: https://bard-ai.js.org/faq/#cant-use-bard

EvanZhouDev avatar Sep 04 '23 18:09 EvanZhouDev

I'm using both __Secure-1PSID and __Secure-1PSIDTS and face the same issue occasionally. Refreshing the __Secure-1PSIDTS cookie solves the issue.

izhekka avatar Sep 12 '23 23:09 izhekka