tiktok-scraper icon indicating copy to clipboard operation
tiktok-scraper copied to clipboard

TypeError: Cannot read properties of undefined (reading 'getUserProfileInfo')

Open zaptrem opened this issue 3 years ago • 2 comments
trafficstars

Describe the bug

I get the following error whenever I call getUserProfileInfo() (my code uses 'ford' as an example username)

TypeError: Cannot read properties of undefined (reading 'getUserProfileInfo')
    at /Users/zaptrem/my-project/dist/index.js:296:67
    at step (/Users/zaptrem/my-project/dist/index.js:56:23)
    at Object.next (/Users/zaptrem/my-project/dist/index.js:37:53)
    at /Users/zaptrem/my-project/dist/index.js:31:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/zaptrem/my-project/dist/index.js:27:12)
    at checkTikTok (/Users/zaptrem/my-project/dist/index.js:289:12)
    at /Users/zaptrem/my-project/dist/index.js:114:42
    at step (/Users/zaptrem/my-project/dist/index.js:56:23)
    at Object.next (/Users/zaptrem/my-project/dist/index.js:37:53)
    at /Users/zaptrem/my-project/dist/index.js:31:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/zaptrem/my-project/dist/index.js:27:12)
    at handler (/Users/zaptrem/my-project/dist/index.js:79:41)
    at Object.<anonymous> (/Users/zaptrem/my-project/dist/index.js:384:25)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47

To Reproduce Steps to reproduce the behavior:

  • Used OS - MacOS 12.4
  • NodeJs Version (node -v) - v16.15.0
  • Scraper Version (tiktok-scraper --version) v1.4.36
  • CLI or Module *module
  • Used method getUserProfileInfo
  • Used options None
  • Do you run the scraper through Proxy, VPN, VPS? No
  • If scraping from a profile. Did you checked if profile is Public? Scraper won't work with Private profiles! Yes
  • Preferably provide URL to the profile,hashtag,video and etc page https://tiktok.com/@ford

zaptrem avatar Jun 08 '22 00:06 zaptrem

I was getting the same error when using webpack.

I changed import TikTokApi from 'tiktok-web-api' to import * as TikTokApi from 'tiktok-web-api' and seemed to fix.

Note I am using the tiktok-web-api package rather than tiktok-scraper.

bwp91 avatar Jun 12 '22 10:06 bwp91

I have the same problem what we can do

Failed to like video by : Cannot read property 'signURL' of undefined

Ahmad1309 avatar Sep 18 '23 02:09 Ahmad1309