Can't sync historical events and create more than one sync events

Hi, I have recently ran into an issue where the new Sync Historical Event I created didn’t sync as expected, it only listened for new events. Moreover, I couldn’t create more than one event.

Once I do it, an error will show up like this “tableName already in use, please set a new tableName”.

I have tried creating a new server. Unfortunately, I ended up with the same issue.

This is the abi and the contract I use

BSC Testnet

{“anonymous”:false,“inputs”:[{“indexed”:true,“internalType”:“address”,“name”:“nftContract”,“type”:“address”},{“indexed”:true,“internalType”:“uint256”,“name”:“id”,“type”:“uint256”},{“indexed”:false,“internalType”:“address”,“name”:“seller”,“type”:“address”},{“indexed”:false,“internalType”:“address”,“name”:“owner”,“type”:“address”},{“indexed”:false,“internalType”:“uint256”,“name”:“price”,“type”:“uint256”},{“indexed”:false,“internalType”:“string”,“name”:“name”,“type”:“string”},{“indexed”:false,“internalType”:“enum NFTGT_Market.status_type”,“name”:“status”,“type”:“uint8”}],“name”:“MarketItemCreated”,“type”:“event”}

0x76fF8D6c044ccac1Be015804aCd02852b4Fdb2ee

Please help

Thanks

you tried to create a new event with a different table name and you got this error?

did you enable historical sync? was there any error? like saying that there are more than 500k records?

what is the server url?

Wow, appreciate your fast reply.

  1. Did you tried to create a new event with a different table name and you got this error?
  • Yes, I already made sure the new table I created was different to the existing ones.
  1. Did you enable historical sync? Was there any error?
  • Yes. I did both enabling and disabling this flag. The same error “tableName already in use, please set a new tableName” showed up. The contract I used in this case is pretty new and it contains just a few transactions there.
  1. What is the server url?

Thanks

I tried testing with another Moralis account and found the exact same issues.

I see a table named BscNftMintEvents on that server that seems to have 18 historical events synced and 2 from yesterday

what are the exact steps to reproduce the problem?

That table is for another purpose and is from an existing Sync Event that I created long ago. Back then, it worked fine. All the history was synced. And I could create more than one Events.

This time I want to add another Event. What I tried was this:

  1. Click on ‘View Detail’ of the target server, select ‘Sync’ tab, click ‘Add New Sync’ and select ‘Sync and Watch Contract Events’
  2. Select:
  • Bsc (Testnet)
  • Description: “abcdefg”
  • Sync_historical: true
  • Topic: MarketItemCreated(address,uint256,address,address,uint256,string,uint8)
  • Abi:
    {“anonymous”:false,“inputs”:[{“indexed”:true,“internalType”:“address”,“name”:“nftContract”,“type”:“address”},{“indexed”:true,“internalType”:“uint256”,“name”:“id”,“type”:“uint256”},{“indexed”:false,“internalType”:“address”,“name”:“seller”,“type”:“address”},{“indexed”:false,“internalType”:“address”,“name”:“owner”,“type”:“address”},{“indexed”:false,“internalType”:“uint256”,“name”:“price”,“type”:“uint256”},{“indexed”:false,“internalType”:“string”,“name”:“name”,“type”:“string”},{“indexed”:false,“internalType”:“enum NFTGT_Market.status_type”,“name”:“status”,“type”:“uint8”}],“name”:“MarketItemCreated”,“type”:“event”}
  • address: “0x76fF8D6c044ccac1Be015804aCd02852b4Fdb2ee”
  • Filter: null
  • TableName: “whatevertablename”
  1. Click ‘Confirm’

image

Ended up with this

1 Like

you tried this today or it happened previous days?

Today, just now, less than a few hours ago.

What I have noticed so far is that if there is no existing Sync Event in my server, I will be able to create this. However, I will run into another issue that the the history won’t sync.

you also have an example of a server where the history didn’t sync?

Yes, you may check this out

serverUrl: https://a0ktl5nxkq09.usemoralis.com:2053/server

I did try on a new server to add two different events on bsc testnet, the event that https://cyjchbmyggos.usemoralis.com:2053/server already has and the event that you pasted here and it worked without problems

maybe there are other intermediate steps that make this problem reproduce

Hmm. I have to admit. I think there might be something wrong with my pc, cuz just now I asked my friend to do it on his with the exact same steps that I did, and it turned out working just fine.

Thanks.

You may close this thread.

there still seems to be a problem somewhere, I don’t know yet how to reproduce it

Maybe can you help check on the backend log of this server?
https://cyjchbmyggos.usemoralis.com:2053/server

It may contain some useful information of why I faced such error.

I will redirect this to the team, maybe we can identify what happens there

1 Like

FYI, I was using Chrome when I found the issue. Just now, I tried on Safari and everything worked fine. Not sure what’s the cause. I already tried clear cache and hard reload on Chrome but the issue is still there

I would assume that it is not related to the browser…