Parse Error 141 on watchEthAddress

2022-04-16T08:49:38.301Z - Error: ParseError: 141 [object Object]
2022-04-16T08:49:38.300Z - Failed running cloud function watchEthAddress for user undefined with:
  Input: {"address":"0xd6b533c21c3769227c53837745ace32c063c79a5","sync_historical":false}
  Error: {"message":{"status":502,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"24","etag":"W/\"18-py7kky+nYw+KpM//zLTacYk1OLw\"","x-response-time":"1.815ms","date":"Sat, 16 Apr 2022 08:49:38 GMT","connection":"close"},"buffer":{"type":"Buffer","data":[123,34,101,114,114,111,114,34,58,116,114,117,101,44,34,100,97,116,97,34,58,123,125,125]},"text":"{\"error\":true,\"data\":{}}","data":{"error":true,"data":{}}},"code":141}
Moralis.Cloud.define("syncAddress", async request => {
  try {
    const address = request.params.address.toLowerCase();
    const sync_historical = request.params.sync_historical;
    const group = request.params.group; //want to add this to the object that is getting stored after watchAddress

    if (!address) return;

    //check if address already synced
    const query = new Moralis.Query("_AddressSyncStatus");
    query.equalTo("address", address.toLowerCase());
    const count = await query.count();
    if (count > 0) return;

    logger.info("sync address " + address);
    await Moralis.Cloud.run(
      "watchEthAddress",
      { address: address, sync_historical: sync_historical },
      { useMasterKey: true }
    );

    const savedAddressQuery = new Moralis.Query("_AddressSyncStatus");
    savedAddressQuery.descending("createdAt");
    savedAddressQuery.limit(1);
    const savedAddress = await savedAddressQuery.first();

    savedAddress.set("group", group);

    return savedAddress.save(null, { useMasterKey: true });
  } catch (error) {
    logger.info("Error: " + error);
  }
});

Im calling this function for development tests through the api console which results in the error from the error log above.

Moralis.Cloud.define("devSync", async request => {
  try {
    data = [
      "0x02a5cbbb6ca999812968f4f035c7ecc59c830128",
      "0xe10824fd1ffb9951215025eb26cda42d2d8d9c4c",
      "0xcc7c335f3365ae3f7e4e8c9535dc92780a4add9d",
      "0x03ee832367e29a5cd001f65093283eabb5382b62",
      "0x987df219564cd274d32b4b442ffad1a185fc0509",
      "0x6611fe71c233e4e7510b2795c242c9a57790b376",
      "0x6f4a2d3a4f47f9c647d86c929755593911ee91ec",
      "0x31a47094c6325d357c7331c621d6768ba041916e",
      "0x6e36de4db8210e641d13703545b4aca6fd02e116",
      "0x383062638dd6f71cdf72ba65c1806ce0c43ca982",
      "0x2999377cd7a7b5fc9fd61db33610c891602ce037",
      "0xd4fa6e82c77716fa1ef7f5defc5fd6eeefbd3bff",
      "0x9e199d8a3a39c9892b1c3ae348a382662dcbaa12",
      "0x254459b53c747e96d8a8a0f4d52ac054559f817d",
      "0x9d4c1c518442ad9eb23cb79a4792d508b49c81af",
      "0xb618aacb9dcdc21ca69d310a6fc04674d293a193",
      "0x9aaf2f84afb2162a1efa57018bd4b1ae0da28cce",
      "0x6301add4fb128de9778b8651a2a9278b86761423",
      "0xcb0a0107419f9aca86e793f0808afc2e4ff490ef",
      "0xfb6223ea050a0956cdf294129a00f66b5ae4f5a5",
      "0x3620b631340f04f32a752ed275d91330c0e41ed4",
      "0xd6b533c21c3769227c53837745ace32c063c79a5",
      "0x1b2965dc3b1697dd10b7126ec7393d79cda2cf91"
      /*"0xeaaeac965449d2426f6f793770b4f3560eeb7c0f",
    "0x485b8ac36535fae56b2910780245dd69dda270bc",
    "0xde86d4ec498a1b7dc0629a82a0d4783b35a3e002",
    "0x47d4f20ae83bcd350105f199f900e6e6104dab6a",
    "0xebc453e098ea5ca81e216441891c84bc4fb6e8e6",
    "0xac881a3d1795ce4d4f4cf1b99f5c69a75a220db3",
    "0x10fe160dae09a8d2fce9d19767f0e888237cdae1",
    "0xf296178d553c8ec21a2fbd2c5dda8ca9ac905a00",
    "0x8928b26de9ecc59cacdba095c6ed6237f48ddbd2",
    "0xa6e2e910515e6cf485462eeb6e454df33c60cb0e",
    "0xa394e5a73117a50edcb7c6440d44638cf854b92c",
    "0xc457749236328d6e27fc7441cc32f273d6ad05ad",
    "0x56d6f5cd1d83cc76305e626a3c724b0bf5cb3f7d",
    "0x6957d2139d29e7db7913ac21e813f2a561e47ac8",
    "0xf210d9e74363c21137535c5bbf41be5526b11864",
    "0x8756da913378b865cc6e5bbd8d403995a0b37567",
    "0x9d09873f3378488526f627bcfbf2efd348971fa2",
    "0x2291e649cc1b0a4bcff64ab64574e35f2ae49f11",
    "0x29a0e282e9e07ee89736d0e72750d39f20f372a4",
    "0x0f4023208058ecffcb22a7409df11f6d6013fe8a",
    "0x575e7770d5e5b2cd1ad12a8beeae6382784ab156",
    "0xf158275fa2a711ada7bcbd66359ecfaf0ac56734",
    "0x752f383a189444a82966761dabb11597c5cdad1d",
    "0x1bb77204b2ed64751138145c26a6b31e836ddcdb",
    "0x59a6f585817e8587fb1360aa1a2475ff599304ba",
    "0x009988ff77eeaa00051238ee32c48f10a174933e",
    "0xf6657d2f8c7b4566985917ca2e2e74d99a106183",
    "0x09549ce242146a2407bbb66b979d64692563bf35",
    "0x75ddb7ab958135bbe2dab48d6286826f6aa5e3b4",
    "0xc53f5a27021455293aa34da308280abc4cad210a",
    "0x9af31a1bad05acc73d3fdb2b96384eeac1cc91ff",
    "0x53dda0a69992b87e51f0f14b1337281f09a2c8da",
    "0xd40999c2b045f6a175acc0b478bbf0bed6e918fc",
    "0xc24f574d6853f6f6a31c19d468a8c1b3f31c0e54",
    "0xbafae6afa1f7b0001860f627354130c859031b76",
    "0xdb5d099a6d2f2bc090fcd258cc564861d552c387",
    "0x78d1fe2706a6bc1df27ca99318f338cae1755f88",
    "0xafe3d8fe31bfa0d7f8e02f06aa9bfb4f817a6cae",
    "0xa81eac3009bd6e6cce36602d6851fda789ddc3bb",
    "0xf6bc89cc57e33c4e8053c4d8e63b70bf8c47e1a1",
    "0xcba794653c56b28800ae4fe5c2ea2c89712c964c",
    "0x57b3abae7e7392571396a4a91bc1ae35bbdd19d7",
    "0x224f590a8b58f83bd2673348d6ac75a7b27f9b54",
    "0x149fd340ca0df54228aacdad7755b05d0e2b23d9",
    "0x7e3058ebee6e5f3adb830dfb02746830a22ae0af",
    "0xb53349160e38739b37e4bbfcf950ed26e26fcb41",
    "0x7c00c9f0e7aed440c0c730a9bd9ee4f49de20d5c",
    "0xd5b171571df3bc207baf2edb175b6ff3820f53a4",
    "0xba91c2dfa26d9b02cb2bdd709ecc45f5b33b0231",
    "0xfe946e240ee6b73b2b6805c81b890b4d5318bb4f",
    "0x06f97f429ff6c2c1284e7000470fbecdb0d52a05",
    "0xcba9f4a67a51fea7023e09030e75523ad6f41533",
    "0x06ef623e6c10e397a0f2dffa8c982125328e398c",
    "0xba567d6ce93c021e46baa959ffc241fe35a10297",
    "0x819e9b46756176838796454a3719f346cb984689",
    "0x4d88dbf593a0dad711aec4c02a7cee79ef6e725c",
    "0xf636b6b5913ee5c3bf4d52d13ce6c40179c794bf",
    "0x67f155474eb685aef6cd874169f25b3bded6aea6",
    "0x7f04eb7ba1a3a05f6cb1100dd0173d68af94a728",
    "0x4515733da791849cd251e75ef30c7fe55ba17bcd",
    "0x1f487bfe9367bbe6880bfdf469346d030bf3439f",
    "0x63abd9a8c6f4035adcd7fe3a5ce16f966276aeda",
    "0x4f0500e3bcf3a09a325d41cb932b774d149c65a1",
    "0x3612b2e93b49f6c797066ca8c38b7f522b32c7cb",
    "0x339ae8fe27e6dbbde874783cff0f4eb83b6b9b55",
    "0x7c00c9f0e7aed440c0c730a9bd9ee4f49de20d5c",
    "0x85b7fb4766146e2f77d980b597816a781ef548e2",
    "0xc29d7fe198328a424b2113c91bcaa843d10e2c3c",
    "0x01b3f674eaeda38c7dd58830bbd08fc9b0834f28",
    "0xac39d3552add3fdf150a6cfad447ee20460586ee",
    "0x0bd22d333f6cf380ca3dae47dc2bc53fbda789fb",
    "0xb61cbc559425bf5f156d8c759b4a72ff09a2dc30",
    "0x30bb881a96213b4dca453564e9eeca366f4db4d4",
    "0xc8a40bdc1c4c331abc4515a4c621f5744518c8b3",
    "0x2bd95558e74560c9813d12839a44e2176bfd07d0",
    "0xd7510a925475cb8377bc8d2a7f1c792022b68df8",
    "0x6f5f3bb493042f07a1f405bb3eb9e6e406583447",
    "0x2190d4ee2bfc8883c3d71f4b5f41acd7a7287ff5",
    "0x73e4a2b60cf48e8baf2b777e175a5b1e4d0c2d8f",
    "0xd946f4983dce96a0057e34ebd27f807125504d15",
    "0x3dac271d1b36a434880c527a678b6487ac9c1f8c",
    "0x94529ce25682e3340b2d1e788aa9aca02011c040",
    "0x850352b0c61aac1efde8c8a4d6c5a17f49e266f6",
    "0xea1c9c2152b77835b06f4ad5df84f6964a1d2117",
    "0x0940d80b446f303a98fc596cb401e9a966b55022",
    "0x982083f8f2a15fd588685f6f0e7372c3642f3936",
    "0x7a72610aba824163d340f63dff7515a839156b04",
    "0x85026596042cf8cab1b521bcca86c56cf2d2ecae",
    "0x73ea52b81cf18c6db256518576ba23a4e89eecda",
    "0x7aa8f0faab2dca4fe090a7ec3c5cd61abbef1c9b",
    "0x901c812ba9c4de51e6cf968ea8c74923c842b271",
    "0xe46bfc3ac7743e2d693d60ebad719525634e23e4",
    "0x6d055e0695869e46ea21da2eb08d985e145bde0b",
    "0x708ce6f05dcd793adc3081a0201439549843cfd7",
    "0x56511585a5a23dea48fcc0aa0a9a13800dec0531",
    "0x64786a62ad601a9830ffb48b6b0085b9e8adefd2",
    "0xf8091a1a3055c9a8a7492e7dcc31162d000747c7",
    "0x9abd34241380645339e43a0418140eaa96cd1ed9",
    "0x325c08a558ff02f244f31ba1e87bf3c1b1c08f45",
    "0x8b7a5b22175614ee194e9e02e9fe0a1b5414c75e",
    "0x2fedb7ed7f4746fe281344109ec97d53f5fbda61",
    "0x8afa39d3eba8c62a29b8dd040d96fce83ea849cf",
    "0x82397c3222c3797aa8c01eb05c316070281cd779",
    "0x97f05bd0e0b0e7af776abbabc01cfd8601ca93c1",
    "0xf2398a92af4619843a08e3c34e5a23918eb4cd5a",
    "0x18131889b876ee2d883417ae3d14aa3dcee2a830",
    "0x8dbbca57ea56290efa14d835bbfd34faf1d89753",
    "0xc266672ab58f57c945fc5fe5cd89b2ae591c6124",
    "0x243fe9cde4f7840029dc954e62714d19279c6303",
    "0x0a9c52dcce024dd72aafeb43c1c253b93ab6ee2c",
    "0x4da792b5058f59162e1b619749a0ce4e984d4841",
    "0x06544ac8b449a6ce511aae1498a6fdd4334ee3c2",
    "0x99f1396495cceaffe82c9e22b8a6ceb9c6b9336d",
    "0xe54cf30a3f31f3076e9ab5bd122379545a137b4c",
    "0xc12eccd96634d0eeddb634d599db90a4f3ecedee",
    "0x4551a7cee16fdce957e41175b917873140ec91f2",
    "0x0dd2ccca95f720b29d912d6e461b61b135625f83",
    "0x2cd3abaddbfc2a487a0c471056f31663f60087de",
    "0x610aec3851d7688c4c8aef3a6173f667e8beef73",
    "0xb5af12b837aaf602298b3385640f61a0ff0f4e0d",
    "0xa5f6d896e8b4d29ac6e5d8c4b26f8d2073ac90ae",
    "0xab43df219baa59afcaa3e1bacc9541e3690f4841",
    "0xd38fbaaab882852276cf81a11d22ef586b76b8b7",
    "0x647f8572a82772fee46b4dbdd336252c7e11a42f",
    "0x7ada7461b2be0cd6869dedec4671d81c3842e823",
    "0x490262214be7b9486dbfaa547a947ac913889dec",
    "0xfa02c9f401cba1165e2e17fba659a3de83d034cf",
    "0x7c7562fbf561859333ed41ddb408b2081279d8b8",
    "0x41955ab7d12f9f6c03de972b91d9b895d9c2eaf8",
    "0x5195396556aa51e4c123bacc9fe965fd102d1947",
    "0x63a9dbce75413036b2b778e670aabd4493aaf9f3",
    "0xd38490c65a65f9f57441d120898344054da594af",
    "0x88923378021bea85f9b09ce571a309e12c7d2262",
    "0xc91c44bb5cf06aaeea920f9a6a9736d4f533e647",
    "0xe631aef5c51a98476d4caed0fce8fa57a3767314",
    "0x98ee4bd996ee665206bda37b6c53b07ee73a0fa9",
    "0x4bd56f1f449f1e88c106fa3a5dc8a1477a792739",
    "0x9795a9baac2f17e7c7f11686bc6bc2afc3d84612",
    "0x3d6afb554e536808087797cf5a2a1a216261aa86",
    "0xe101907cc4c1e427989a14747343d6dd7cda2031",
    "0x2123edd3ed0f0c09a7af4cab58b4881b50a1f878",
    "0x2b72a427fe696cbfa70c2884b94564fb0679fa94",
    "0xf61a47c2e2ffb144c5f62042997b5fa6de7787d6",
    "0x53b77b9a06dd7e11aee247957784d76484fff540",
    "0x14272fde40789f2debfb51a15a116ab3ff2074b4",
    "0x786cabb5e602d47dc8365ef014412d6e4ee63427",
    "0x037ac7fa0039da18d9bda7fa946c684358be4b52",
    "0x78f0269f5b1ca914c8c58993f41181f89e212b27",
    "0xe0d620f829ec31b09a43f05fb73f4a5d5c773341",
    "0x78647aa39ccf72e2e1242cfcd78c9413b6a5b04a",
    "0xc3ebcef8a57c0b076dde27a51a78023ab7e1bb18",
    "0x63748140c409b490952c37dae5a60715bf915129",
    "0x71dbcd7fffb380387bcdd7f334176ff605ee4fa2",
    "0x1183769cbff41e7c0a6a99c7cfbae91ffd1cb60a",
    "0xd0da2d7e86234560c2e29e1e8304455dfd8d16b8",
    "0xc942237914981fad5815f79f8f1c1292b98913e7",
    "0xfd2204757ab46355e60251386f823960acccefe7",
    "0xf9e56d2ec48d99c9a1bc2d466824c920bbc01837",
    "0xb6b7b48166647fe132d34253978d5f5cd499c905",
    "0x7d112b3216455499f848ad9371df0667a0d87eb6",
    "0x64c107497d7521c7fd1489c0ebc1d38ed9e3fca2",
    "0x452aef7e7bf5733afc8a9f4b4f9e47cb0a137a6e",
    "0xfe5573c66273313034f7ff6050c54b5402553716",
    "0x6b67623ff56c10d9dcfc2152425f90285fc74ddd",
    "0xf0f0682600eea116a1a15ab0e9c0311b7dbaf41a",
    "0x0dc30dd2f950ef800d14a945ebd02a0031aaf4db",
    "0xad40d70d1d29d79b9ae3d92de9902580ccdcb31f",
    "0xf916719c7251e109cf3d1a977b6cad198b630c32",
    "0xc4293f52633b3603e65e9b4c2b4df40eeecca91c",
    "0xd9ee914d74f442442fe501d94757d7625e8e1dd3",
    "0x3654706dc731cffe9dc63a2c0382462a3dd1ad52",
    "0x67a74108a9990bbe21582193bb99cbed6ecfea30",
    "0x3c2b4bdcd2f742c55186fc599cb733a127e2b8ab",
    "0xd084fecf9b8e435b971d3fd9244bf6e69b025146",
    "0x796de99b02a6313d5ad081ac738f2466f8bd7db5",
    "0x55a9c5180dcafc98d99d3f3e4b248e9156b12ac1",
    "0x809e82136239a5f26596bd6ce9192207bdffa04c",
    "0x8c0a7ebb6a17d9176bb4a97f25e33e12af121205",
    "0x4233c93649444871fdb2a5bb63ab548f41e9a71f",
    "0xdef3d987131791b2712297f17654da42fd63f6b0",
    "0x93ee522bac349ec70b2327c87f5c5095b6deab5c",
    "0x1c1d70f561929941496180003ea21d23bad53535",
    "0x0ffd5a9659b011b448fbdeaceee480879bd60af0",
    "0x41c389c0a86ad99323f123733de6c106c4c28402",
    "0xcaf6fd54fb74c95b28f5e94952ca21b46e4071cc",
    "0xf54e6047ba3e52840730c28d260122854d335ebc",
    "0xe1d29d0a39962a9a8d2a297ebe82e166f8b8ec18",
    "0x877adf7a6d29a4678dc86cba270a2c5257b6ecc9",
    "0x7feb19b7fc9975a29100c698d97ce1f127382db0",
    "0xd580b71e2094c8b89c5c15413c3638b94f3d166b",
    "0xaf8bfea55e7ae2a69b17e03b0e157bdc138237c9",
    "0xd387a6e4e84a6c86bd90c158c6028a58cc8ac459",
    "0x5be8f739c8ea94d99b44ab0b1421889c8b99b2e1",
    "0x2e8d1ead7ba51e04c2a8ec40a8a3ed49cc4e1cef",
    "0x0b4ae84e396aee628c562449bc6d49968c1e1aef",
    "0x0eb9a7ff5cbf719251989caf1599c1270eafb531",
    "0x6ff412f54e10588a2cf0442ccfb228f866ff1684",
    "0x698e41734141ab1557a6c9e1bfdfbc875248336b",
    "0x0f79000ed842e1b0701cb9d6d8aa992c5f7d12d4",
    "0xcef5109cd1adc9451162732d68d739fe0242ab3a",
    "0xd563bb51ff55eff701569b9abe6f8f188bdc25ff",
    "0x4026b3da349c2952255ca9db4f055ea57f4e037c",
    "0x5199d6204b788016353a201b8dad4668a71f1a8a",
    "0x342d662ce44bc2509d563c3a2c7ab8996801e714",
    "0x214d1437f27d52b8bf24e0a1f6fae86f5ff2a75b",
    "0x6505491adfe51412e65e0e4e2918865df1349183",
    "0xa8f337cc631c8e7e8d9e966529b4bb41f209831a",
    "0x8d0050a5b6a6978164356095dfe409158892c4e5",
    "0xe27f08a01a3b1380866919ff768dfcf8cd7f3488",
    "0x0c1dffd1e071faf1883d81e7cba1e27d8f63adf3",
    "0xe349751baeed04b12c52625dd1eb22bbfcddfab7",
    "0x4bbb41f61fffc1bbe65a2aa192c65281e16ea758",
    "0x3aaf054780309c735baaa9c930670340c458ac1b",
    "0x89b68cba02637cfb1266f0dece2856b040b563c3",
    "0xb89c2f6bb674bd6aace2a1e274d40e6dc4775b15",
    "0xbfe440c533f6861c00e71ce187f37a1a70b7b7e9",
    "0x8b3f4eb783270aefaac9238ac1d165a433c8fbf3",
    "0xbaaba861464f25f52c2ee10cc3ac024f4f77812a",
    "0xeb67126648cd9458b7f277803fed75ca074cce66",
    "0xaf5760607ead7e0a152f8b9987e95174fc32af70"*/
    ];

    for (let i = 0; i < data.length; i++) {
      await Moralis.Cloud.run("syncAddress", {
        address: data[i],
        sync_historical: false,
        group: "NFT-SM"
      });
    }
  } catch (error) {
    logger.info("error: " + error);
    return error;
  }
});

Iโ€™ll check later, I would expect it to work.

1 Like

this works fine for me on my server:

Moralis.Cloud.define("test_sync", async (request) => {
   logger.info("start")
   x = await Moralis.Cloud.run(
      "watchEthAddress",
      { address: "0xeb67126648cd9458b7f277803fed75ca074cce66", sync_historical: false },
      { useMasterKey: true }
    );
  logger.info("end")
  return x;
  
})

try to add a delay between requests here:

the weird thing is that I used this funciton many times in the past without issue, now its not working all of a sudden.

can you try again now? I restarted coreservices

still

2022-04-16T13:10:40.794Z - error: {"message":{"status":502,"headers":{"x-powered-by":"Express","access-control-allow-origin":"*","content-type":"application/json; charset=utf-8","content-length":"24","etag":"W/\"18-py7kky+nYw+KpM//zLTacYk1OLw\"","x-response-time":"1.271ms","date":"Sat, 16 Apr 2022 13:10:40 GMT","connection":"close"},"buffer":{"type":"Buffer","data":[123,34,101,114,114,111,114,34,58,116,114,117,101,44,34,100,97,116,97,34,58,123,125,125]},"text":"{\"error\":true,\"data\":{}}","data":{"error":true,"data":{}}},"code":141}

try again in 10 minutes, I think that I found out what happened, trying a hard reset to the server

still having the same errors for some reason.

ok, it looks like the problem is still there, it seems to be related to redis, I donโ€™t know how to fix it now

what can I do? I need that stuff to be working cause I pay a subscription for that app to run :S

I will have to ask the team on how to fix it

1 Like

thanks, maybe if you are gonna get in touch with devs anyway you can also try to get a status for the unionWith aggregation if possible. Cheers

it looks like an invalid event sync was added with an invalid abi (an abi that doesnโ€™t contain an event)

donโ€™t know yet if is related to the problem

I deleted that invalid event sync now and restarted coreservices

can you check if it works now?

unfortunatly no difference. That event you are talking about I remember having added roughly 2 weeks ago. I dont think that is the cause of the issue as I used the function several time eversince then.

edit, after few minutes the collection has some new documents stored, seems to have worked now but I got other errors that I am rate limited on that server which is currently running on the 199 USD plan. Is there anyway to increase rate limit for cash?

the server seems to be overloaded now in 100% cpu sometimes

you can increase that limit with a better plan, you can send an email to [email protected] if you want to increase that limit

it seems to have synced historical data as well now for the new addresses even tho I passed sync_historical to false for these new addresses. Could be the reason why its showing rate limited now

you could also try this syntax:

    const results = await Moralis.Cloud.run("watchEthAddress", {address: "afdasfdda", syncHistorical: false}, {useMasterKey: true})

maybe delete everything from this server/(unwatch the addresses) and start over?