Closed bdougie closed 1 year ago
@a0m0rajab Maybe you can provide more context on why this does not work anymore? I tried increasing the timeout milliseconds but that didn't help either.
I could not reproduce it on: https://github.com/open-sauced/ai/releases/tag/v1.12.0-beta.1 Is it in Dev or Prod?
Can we get on a call to debug this? It seems to work only for you, maybe you can tell what's wrong once you see what's happening on my end?
Sure! I will message you on discord.
we did a check with @diivi and could not find a full answer for that, he will write the update about our call. As for my side, I will test the extension on a new user and new pc then will update it.
Had a one-hour call with @a0m0rajab today regarding this, thank you for your patience!
It seems to be working fine on his PC, but I'm facing some issues. We found a workaround by not changing the active tab to the LinkedIn page. This method fills the data nicely, albeit in the background. We'll conduct some more testing, and if it doesn't work uniformly for both of us, we'll revert to the activeTab: false
approach.
Did this work before, by the way? or was it only working on my side the whole time?
I tried to test this again by:
If it worked before, can someone just try to fresh install the repo on new folder and try it?
and in both cases worked for me, I am not sure how to test it right now, if anyone from @open-sauced/triage has a time to check, I would love to do pair programming session with you. If not you can check the next to debug it and share your insights with us:
What I am thinking to test is the next:
To test this we need to do the next:
In the lines of the fetching: https://github.com/open-sauced/ai/blob/311f456d7c0332efc451b0f60dfd3a1832ec1cf7/src/popup/pages/home.tsx#L184-L197
We need to remove the script running lines and print the data on console.log if we get data from the fetch then it's okay. This will be need to checked in the popup DevTools.
to do this we can simply change the callback function in our script, to do this do the next:
Remove the whole code in the populate data script and write a console.log
Check if this has been printed in the linkedIn DevTools. If it worked, then we have a functioning scripts.
Try to change the active tab to false and check if the script is running.
For further understanding of the code that's written you can check: https://developer.chrome.com/docs/extensions/reference/tabs/#method-create https://developer.chrome.com/docs/extensions/reference/scripting/#method-executeScript
talked with @takanome-dev he got the same issue, it did not work. Thank you for your time! I tried another PC (borrowed it from a non developer) and it worked smoothly! My question now is why it's working with me only? 😕
I didn't try it using the dev build though, will give it a shot :+1:
Update: Tried the steps mentioned above but still nothing. One thing I noticed is after setting the active tab to false and clicking add to LinkedIn
, errors start popping up in the extension
cc @a0m0rajab @diivi
talked with @takanome-dev he got the same issue, it did not work. Thank you for your time!
I tried another PC (borrowed it from a non developer) and it worked smoothly! My question now is why it's working with me only? 😕
Might be the case that your linked is different. Are you paying for any features or opted into anything?
It might be worth trying a different LinkedIn account entirely.
@takanome-dev I do not think that the tab is the issue, the logic of the code is being like the next:
since the tab is being opened we know that the code fetched something from GitHub, what I am not sure about is the next:
Might be the case that your linked is different. Are you paying for any features or opted into anything
I have a normal account, no beta neither paid features! I will try a friend account though.
I got the response from github but couldn't see the data in populateDataToLinkedIn
after a console log.
Do the selectors change
Which selectors? (not very familiar with the codebase :sweat_smile:)
@takanome-dev selector in linkedin page, to test this we can do the next:
const inputFields = document.querySelectorAll(".artdeco-text-input--input");
inputFields[0].value = "Test";
inputFields[1].value = "Test Desc";
if it works then the linkedin selectors does not change and the issue is in the callback function.
As for me I have tried this with another PC, it was a Chromebook, it did not work on my profile or my friend's profile.
Would the operating system differ or the chrome API?
Alright, what's happening is that Github returns 404
when fetching https://api.github.com/repos/open-sauced/insights/
and 200
for https://api.github.com/repos/open-sauced/insights
It works by removing that trailing slash and setting the active tab to false (not sure why) :smile:
const getRepoAPIURL = (url: string) => url.replace(/github\.com/, "api.github.com/repos").replace(/\/$/, "");
When I add the trailing slash, the extension adds undefined text to the text we fill with, here is the video:
https://github.com/open-sauced/ai/assets/18273833/c3d9fd06-b920-4acb-b243-af21a4848f86
My chrome version is: Version 114.0.5735.248 (Official Build) (64-bit) this could have an impact though.
I opened a PR to just add a function to have logs being unified with us, if the log is not printed in the linkedin page console, then the excute script is not working...
When I add the trailing slash, the extension adds undefined text to the text we fill with
Yeah, because Github returns a not found
My chrome version is: Version 114.0.5735.248 (Official Build) (64-bit)
I don't think so. Mine is Version 115.0.5790.102 (Official Build) (64-bit)
if the log is not printed in the linkedin page console, then the excute script is not working...
Tried it but no way I could see it 😂
Yeah, because GitHub returns a not found
What I meant here is that the extension works even if GitHub returns not found.
Tried it but no way I could see it 😂
So nothing is printed on the console?
So nothing is printed on the console?
Actually, I saw it after increasing the limit of the timeout
😄 That's a move forward! was the active tab option false or true? and what is the timeout number that you used? i got exited it worked on another PC lol.
was the active tab option false or true?
false
what is the timeout number that you used?
5000 ms. Maybe that's too much but it gave me the time to switch to the opened LinkedIn tab and open the console
Did it work when the active tab were true?
Did it work when the active tab were true?
No, it didn't work
:tada: This issue has been resolved in version 1.14.1-beta.4 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 1.14.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Describe the bug
When submitting a project to LinkedIn, I have not been able to get the title and body to to be filled.
Steps to reproduce
Browsers
Chrome
Additional context (Is this in dev or production?)
I am not sure if the selector is working.
Code of Conduct
Contributing Docs