![Linkedin post reactions scraper avatar](https://images.apifyusercontent.com/Ufh7Byn0Jr9Zpg-59RxrFXEXJpjdNeF0drMn-geKzNo/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9HRzhYNWEycmxoY0FUNllvOS9IakN6TFFqSGlSS0ZNUEw2Sy1MaW5rZWRpbi5wbmc.webp)
3 days trial then $13.00/month - No credit card required now
![Linkedin post reactions scraper](https://images.apifyusercontent.com/Ufh7Byn0Jr9Zpg-59RxrFXEXJpjdNeF0drMn-geKzNo/rs:fill:250:250/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9HRzhYNWEycmxoY0FUNllvOS9IakN6TFFqSGlSS0ZNUEw2Sy1MaW5rZWRpbi5wbmc.webp)
Linkedin post reactions scraper
3 days trial then $13.00/month - No credit card required now
Scrape reactions or likes from linkedin post
`TypeError` in `linkedin.js`: Unable to Read Null Property
Closed
An error occurs in linkedin.js
at line 40 when attempting to access matches[1]
from a null matches
object, leading to a TypeError
. The error is observed during the page fetch process in the Docker container. It suggests potential issues with regex matching or parsing within the related methods. The system runs on Apify version 3.1.5, Node version v16.20.1, and Linux OS.
![curious_coder avatar](https://apify-image-uploads-prod.s3.amazonaws.com/jodA8dKTGDWyAvdT4/fZ7gCoyjDwPpEcjrm-myAvatar.png)
Glad you reported this issue. Fix has been done.
orchid_clamp
You sure? Still get the same error:
2023-09-06T13:14:13.015Z ACTOR: Pulling Docker image from repository. 2023-09-06T13:14:14.028Z ACTOR: Creating Docker container. 2023-09-06T13:14:14.172Z ACTOR: Starting Docker container. 2023-09-06T13:14:16.260Z INFO System info {"apifyVersion":"3.1.5","apifyClientVersion":"2.7.1","crawleeVersion":"3.3.3","osType":"Linux","nodeVersion":"v16.20.2"} 2023-09-06T13:14:16.574Z INFO Fetching page 0 2023-09-06T13:14:16.728Z file:///usr/src/app/src/linkedin.js:44 2023-09-06T13:14:16.730Z return body.elements[0] 2023-09-06T13:14:16.733Z ^ 2023-09-06T13:14:16.736Z 2023-09-06T13:14:16.738Z TypeError: Cannot read properties of undefined (reading '0') 2023-09-06T13:14:16.742Z at Client.getPostByUrl (file:///usr/src/app/src/linkedin.js:44:24) 2023-09-06T13:14:16.745Z at processTicksAndRejections (node:internal/process/task_queues:96:5) 2023-09-06T13:14:16.748Z at async Client.getActivityIdFromPostUrl (file:///usr/src/app/src/linkedin.js:29:23) 2023-09-06T13:14:16.750Z at async file:///usr/src/app/src/main.js:17:18
![curious_coder avatar](https://apify-image-uploads-prod.s3.amazonaws.com/jodA8dKTGDWyAvdT4/fZ7gCoyjDwPpEcjrm-myAvatar.png)
I checked again with exact input you have used in the run you have shared. I got an error, but it was different than one you have shared in last message, but i fixed it and pushed another update.
Did you try with a different URL ? if yes, give me the new URL
orchid_clamp
Hi! So I am running it with thus URL:
https://www.linkedin.com/feed/update/urn:li:activity:7104750023355047937/
Receiving these logs:
2023-09-07T08:46:50.305Z ACTOR: Pulling Docker image from repository. 2023-09-07T08:46:51.566Z ACTOR: Creating Docker container. 2023-09-07T08:46:51.974Z ACTOR: Starting Docker container. 2023-09-07T08:46:53.699Z INFO System info {"apifyVersion":"3.1.5","apifyClientVersion":"2.7.1","crawleeVersion":"3.3.3","osType":"Linux","nodeVersion":"v16.20.2"} 2023-09-07T08:46:53.808Z INFO Fetching page 1 2023-09-07T08:46:54.454Z file:///usr/src/app/src/linkedin.js:79 2023-09-07T08:46:54.457Z connectionType: item.reactorLockup.label.text, 2023-09-07T08:46:54.459Z ^ 2023-09-07T08:46:54.463Z 2023-09-07T08:46:54.466Z TypeError: Cannot read properties of undefined (reading 'text') 2023-09-07T08:46:54.468Z at file:///usr/src/app/src/linkedin.js:79:58 2023-09-07T08:46:54.471Z at Array.map (
I also ran it with this URL: https://www.linkedin.com/posts/edhec-augmented-law-institute_accord-g7-que-pensez-dun-imp%C3%B4t-minimum-activity-6807702379925000192-WWeV/
and got these logs: 2023-09-07T08:48:23.654Z ACTOR: Pulling Docker image from repository. 2023-09-07T08:48:24.745Z ACTOR: Creating Docker container. 2023-09-07T08:48:24.923Z ACTOR: Starting Docker container. 2023-09-07T08:48:27.306Z INFO System info {"apifyVersion":"3.1.5","apifyClientVersion":"2.7.1","crawleeVersion":"3.3.3","osType":"Linux","nodeVersion":"v16.20.2"} 2023-09-07T08:48:27.512Z INFO Fetching page 1 2023-09-07T08:48:27.647Z file:///usr/src/app/src/linkedin.js:44 2023-09-07T08:48:27.649Z return body.elements[0] 2023-09-07T08:48:27.651Z ^ 2023-09-07T08:48:27.653Z 2023-09-07T08:48:27.655Z TypeError: Cannot read properties of undefined (reading '0') 2023-09-07T08:48:27.657Z at Client.getPostByUrl (file:///usr/src/app/src/linkedin.js:44:24) 2023-09-07T08:48:27.659Z at processTicksAndRejections (node:internal/process/task_queues:96:5) 2023-09-07T08:48:27.661Z at async Client.getActivityIdFromPostUrl (file:///usr/src/app/src/linkedin.js:29:23) 2023-09-07T08:48:27.663Z at async file:///usr/src/app/src/main.js:17:18
![curious_coder avatar](https://apify-image-uploads-prod.s3.amazonaws.com/jodA8dKTGDWyAvdT4/fZ7gCoyjDwPpEcjrm-myAvatar.png)
Done. Both are fixed in build 1.0.7
orchid_clamp
Like a charm, thanks a lot!
- 21 monthly users
- 3 stars
- 81.6% runs succeeded
- 0.83 hours response time
- Created in Jul 2023
- Modified 25 days ago