Comments (10)
I was able to resolve this in my fork, you need to log in to browser with dev tools and navigate to the practice > listen practice screen. Search for the sessions requests in your network tab, it will give you a proper list of challengeTypes (not sure as to why they differ between accounts), use that list with your request in index.js and it should go through 🙂. Edit: you may also have to change the listening type
from duolingo-hack.
I created a new fork too but didn't work
from duolingo-hack.
The error message TypeError: Cannot read properties of undefined (reading 'find') indicates that its trying to access the property skillId of an undefined value. In JavaScript, the find() method returns the value of the first element in the array that satisfies the provided testing function. If no values satisfy the testing function, undefined is returned, and you cannot access properties of undefined.
The problematic line is:
skillId: xpGains.find(xpGain => xpGain.skillId).skillId,
from duolingo-hack.
Same problem here
from duolingo-hack.
This worked thank you so much
from duolingo-hack.
Hi all!
I also encountered the same problem and this is what I came to. My duolingo has two courses: English and math. Before this, the method in the instructions worked for me a couple of times (using GitHub Actions), but then it always gave me this error.
Changing challengeTypes like @j6nca did not work, and the error was actually hidden in the line “skillId: xpGains.find(xpGain => xpGain.skillId).skillId”, as @Bussin537 said.
The point is that xpGains has different skillIds for all courses that you have. And when the first course in the list was a mathematics course that had skillId: 'bt_decimals_11' - an error was thrown.
To fix this error, I added a condition and changed the line
"skillId: xpGains.find(xpGain => xpGain.skillId).skillId"
on
"xpGains.find(x => !!x.skillId && x.skillId.length > 30).skillId"
because my English courses have a skillId in the form of different letters and numbers in the amount of 32 pieces.
Tag me if my solution doesn't work for you, I'll try to help
from duolingo-hack.
@sadeathoughts , the code doesnt work, it show me this error:
file:///home/runner/work/duolingo/duolingo/index.js:68
skillId: xpGains.find(xpGain => xpGain.skillId).skillId,
^
TypeError: Cannot read properties of undefined (reading 'skillId')
at file:///home/runner/work/duolingo/duolingo/index.js:68:48
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.19.0
Error: Process completed with exit code 1.
from duolingo-hack.
@Javi17mod that means the xpGains has not any objects with defined skillid (or just empty array)
try to find out what is in your xpGains
can I dm u somewhere?
from duolingo-hack.
Hey everyone, I've updated the script and simplified it a bit, removing the need for xpGains
completely. Update your forks and see if that works.
from duolingo-hack.
Hey @rfoel , if you enter my fork, I have a small code, that shows like 1000/0 0% off the exp earned, if you want, you can see it and use it, now it works
from duolingo-hack.
@Javi17mod what did you modify exactly? Is something still broken?
from duolingo-hack.
No, just a simple console log system, and you put the console log in the incorrect place, put it in the
`).then((response) => response.json());
xp += response.xpGain; `
Part, and help me because I win less and slower xp @rfoel
from duolingo-hack.
Oh I see.The way I implemented it will only work if the code does not break. I have seen people trying to do 100 lessons in one go and this will certainly break at some point, so they would never see the end gains. Yours implementation makes sense, but I don't see a reason to change the code now.
About the less and slower XP, this happens because the lesson type, which will not depend on the "skillId", gives 10 XP per lesson instead of the usual 20 for speaking or listening lessons. I think that's fine because the main intent of this repo is to keep the streak, not really farm XP. Farming XP is a possibility but not the main goal.
from duolingo-hack.
Ok, but the code, when you are seeing the console, it doesn’t log anithyng, but if it fails, it will show the error
from duolingo-hack.
@GhostLemonPie , delete my fork, or consequences will happend, but I can help if you give me access
from duolingo-hack.
Related Issues (11)
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 duolingo-hack.