Comments (23)
from moralis-js-sdk.
Hi @h4nz4! Thanks for reporting. We are looking at this.
from moralis-js-sdk.
@h4nz4 are you certain that you're not exceeding your account limits?
from moralis-js-sdk.
from moralis-js-sdk.
I've executed the below code and I'm receiving data without any problems for an hour now.
Maybe your hook throws an error. The webhook should return HTTP 200.
import Moralis from 'moralis';
import { EvmChain } from '@moralisweb3/common-evm-utils';
async function main() {
Moralis.start({
apiKey: '<API_KEY>',
});
const stream = await Moralis.Streams.add({
chains: [EvmChain.ETHEREUM],
description: 'test sdk',
tag: 'test',
webhookUrl: '<WEBHOOK_URL>',
abi: [
{
anonymous: false,
inputs: [
{
indexed: true,
name: 'from',
type: 'address',
},
{
indexed: true,
name: 'to',
type: 'address',
},
{
indexed: false,
name: 'value',
type: 'uint256',
},
],
name: 'Transfer',
type: 'event',
},
],
topic0: ['Transfer(address,address,uint256)'],
includeContractLogs: true,
});
console.log('stream', stream.toJSON());
const addr = await Moralis.Streams.addAddress({
id: stream.result.id,
address: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0',
});
console.log('addr', addr.toJSON());
}
main();
from moralis-js-sdk.
from moralis-js-sdk.
https://docs.moralis.io/streams-api/evm/error-handling
Your Stream can enter into error state on the following 2 scenarios:
- Your webhook success-rate is below 70%
- Your server is not consuming the webhooks (...)
from moralis-js-sdk.
from moralis-js-sdk.
The stream will get the error
state if the webhook is broken. But if you reach out the limit then the state is paused
.
"status": "paused",
"statusMessage": "Streams paused because of exceeded records",
"status": "error",
"statusMessage": "Stream in error state due to too many failed webhook requests, you can activate it by either updating the stream or through the /streams/evm/{id}/status endpoint"
You may check the statusMessage
for your stream by the SDK:
const streams = await Moralis.Streams.getAll({
limit: 20,
});
If that won't help, please write a message to our support: [email protected] More details like your account info may be necessary.
from moralis-js-sdk.
@h4nz4 have you solved the problem?
from moralis-js-sdk.
The problem is sadly still there. I also posted on Moralis forum, and got no helpful suggestion from the community. I would understand, if the streams went into errored state, but they switch into paused state, by themselves, and they have to be manually reset to the active state. The usage limits have never been achieved, not even 20% of the Free plan usage cap.
Please, help!
from moralis-js-sdk.
What a message do you have in the statusMessage
after the problem occurs?
from moralis-js-sdk.
from moralis-js-sdk.
You can read it by calling the API for the list of your all streams.
const streams = await Moralis.Streams.getAll({
limit: 10
})
console.log(streams.result[0].statusMessage);
from moralis-js-sdk.
I checked now. The paused streams have statusMessage "Disconnected from Demo" - what does it mean? Could this be the reason the streams pause by themselves?
from moralis-js-sdk.
I have this status when:
- I've created a demo stream from the admin panel.
- The stream is in the demo mode
- I've closed the browser tab with the preview of the stream.
Are you sure that you have created a stream by the SDK? Please be sure that, you don't have the admin panel opened in the background.
from moralis-js-sdk.
from moralis-js-sdk.
For the demo mode it's not possible. The demo mode is only for testing purposes. You need to switch the mode to prod
.
from moralis-js-sdk.
from moralis-js-sdk.
It could be. You need to test it on your side.
from moralis-js-sdk.
@h4nz4 Have you tested it? Can we close this issue?
from moralis-js-sdk.
@h4nz4 can we close this issue?
from moralis-js-sdk.
Due to inactivity I close this issue. If the problem still occurs, please open a new one.
from moralis-js-sdk.
Related Issues (20)
- Test Github Sync HOT 1
- Missing property `msg.sender` in `getContractEvents` HOT 3
- yarn build project is not working because morals module is missing HOT 3
- [email protected] problem with type in package.js HOT 3
- Return type of Native Transaction missing 'internal_transactions' property HOT 2
- Error: Unauthorized in parse-server-migration HOT 1
- Testing Moralis SDK Locally HOT 5
- `Moralis.Streams.parsedLogs()` breaks when using contracts calling another contracts. HOT 2
- Option to pass baseUrl to EvmApi HOT 5
- Error: undefined Unable to resolve module moralis/common-evm-utils in React-Native project HOT 3
- Property 'EvmApi' does not exist on type 'typeof Moralis' HOT 6
- @moralisweb3/common-evm-utils -> Arbitrum Goerli Chain Object HOT 4
- Package path ./providers/credentials is not exported from path HOT 2
- Adding extra data field to Next Auth session object HOT 6
- @moralisweb3/next keeps unrelated packages to be run in runtime `@solana/buffer-layout` and `ethereumjs-utils` HOT 15
- @moralisweb3/next does not send API request to its fixed endpoint, instead it sends request to localhost HOT 8
- PHI Network Smart Chain Support HOT 1
- For some reason, it does not populate the database with the streams HOT 4
- broken hooks links in README.md for `packages/next` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moralis-js-sdk.