benjypng / logseq-tweet-plugin

MIT License
13 stars 1 forks source link

Struggling to get working - error message? #2

Closed richd67 closed 2 years ago

richd67 commented 2 years ago

Seems to suggest tweet is blank but, characters are counted and get this error logseq-tweet-plugin Error! Please check console logs and inform the developer.

benjypng commented 2 years ago

Do you have a screenshot of your tweet block and the console logs?

richd67 commented 2 years ago

Where do I find the console logs, I couldnt see them anywhere?

benjypng commented 2 years ago

If you are on Windows, it's Ctrl+Shift+I. If you are on Mac, it's Ctrl+Opt+I.

richd67 commented 2 years ago

Ctrl+Shift+I did give me a screenshot? but not logs unknown_2022 01 31-08 53 ?

benjypng commented 2 years ago

Can you try Control+Shift+J

On Mon, Jan 31, 2022 at 4:59 PM Prof D @.***> wrote:

Ctrl+Shift+I did give me a screenshot? but not logs [image: unknown_2022 01 31-08 53] https://user-images.githubusercontent.com/70855766/151765222-1650d016-26a7-4db7-ae2e-580b79862b0a.png ?

— Reply to this email directly, view it on GitHub https://github.com/hkgnp/logseq-tweet-plugin/issues/2#issuecomment-1025510308, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNXKGN3DJ2RSPISZPR6PELUYZFN7ANCNFSM5NBCQWIQ . You are receiving this because you commented.Message ID: @.***>

richd67 commented 2 years ago

That does not work either? Are you referring to the browser console? Or does the desktop app have a console? I am using desktop version on windows?

benjypng commented 2 years ago

The desktop app actually has a console! Hmm it's strange that the shortcuts don't work though.

There is a possibility that the settings are not setup correctly. Can you take a screenshot of your settings file and just blanking out your actual secrets and keys?

richd67 commented 2 years ago

I discovered that the short cut was allocated to my radeon software. Anyhow looking at the console I copied this section as it looked most relevant? Not sure if this helps?

{}

module.js:215 Unexpected error when checking capturing opt-out status: TypeError: Cannot read properties of undefined (reading 'token') (anonymous) @ module.js:215 api.twitter.com/2/tweets:1 Failed to load resource: the server responded with a status of 403 () index.d54d1551.js:3 Error: Request failed with code 403 at h.createResponseError (/C:/Users/77780758/.logseq/plugins/logseq-tweet-plugin/dist/index.d54d1551.js:2) at h.onResponseEndHandler (/C:/Users/77780758/.logseq/plugins/logseq-tweet-plugin/dist/index.d54d1551.js:2) at s.o.register.s.emit (/C:/Users/77780758/.logseq/plugins/logseq-tweet-plugin/dist/index.d54d1551.js:2) at F (/C:/Users/77780758/.logseq/plugins/logseq-tweet-plugin/dist/index.d54d1551.js:2) at p.o.register.p.run (/C:/Users/77780758/.logseq/plugins/logseq-tweet-plugin/dist/index.d54d1551.js:2) at c (/C:/Users/77780758/.logseq/plugins/logseq-tweet-plugin/dist/index.d54d1551.js:2) index.d54d1551.js:3 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'length') at A. (/C:/Users/77780758/.logseq/plugins/logseq-tweet-plugin/dist/index.d54d1551.js:3) DevTools failed to load source map: Could not parse content for file:///C:/Users/77780758/AppData/Local/Logseq/app-0.5.9/resources/app/js/index.umd.js.map: Unexpected end of JSON input DevTools failed to load source map: Could not parse content for file:///C:/Users/77780758/AppData/Local/Logseq/app-0.5.9/resources/app/js/isomorphic-git/1.7.4/index.umd.min.js.map: Unexpected end of JSON input DevTools failed to load source map: Could not parse content for file:///C:/Users/77780758/AppData/Local/Logseq/app-0.5.9/resources/app/js/index.umd.js.map: Unexpected end of JSON input core.cljs:193 "Datascript query: " [:find (pull ?b [:db/id :block/uuid :block/parent :block/left :block/collapsed? :block/format :block/refs :block/_refs :block/path-refs :block/tags :block/content :block/marker :block/priority :block/properties :block/pre-block? :block/scheduled :block/deadline :block/repeated? :block/created-at :block/updated-at :block/file :block/heading-level {:block/page [:db/id :block/name :block/original-name :block/journal-day]} {:block/_parent ...}]) :where [?b :block/refs [:block/name "card"]] nil]

benjypng commented 2 years ago

Thanks for providing it! It says that it is a code 403 error, which points to the tokens or secrets not being set up correctly.

Can you take a screenshot of your settings file and just blanking out your actual secrets and keys?

richd67 commented 2 years ago

I have played about with the settings file and this is the only format where I have been able to get the /tweet to appear and render. I have replaced my keys/tokens with ***

{ "disabled": false, "appKey": "", "appSecret": "", "accessToken": "", "accessSecret": "", "preferredDateFormat": "yyyy-MM-dd" }

benjypng commented 2 years ago

Can I confirm that you have an Essential developer account and no one else is using it? The error you encountered is a little strange.

richd67 commented 2 years ago

I have an Academic account which I understood gives the widest access of features? Maybe that is wrong?

benjypng commented 2 years ago

I don't actually have an academic account so I am not sure if there is an impact.

In your Twitter developer portal, within your application, are you able to select OAuth 1.0a? And in your Keys and Tokens page, are your Access Tokens and Secrets created with Read and Write permissions?

On Thu, Feb 3, 2022 at 5:35 PM Prof D @.***> wrote:

I have an Academic account which I understood gives the widest access of features? Maybe that is wrong?

— Reply to this email directly, view it on GitHub https://github.com/hkgnp/logseq-tweet-plugin/issues/2#issuecomment-1028785210, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNXKGPQ7JU75UCM3E53ME3UZJD4ZANCNFSM5NBCQWIQ . You are receiving this because you commented.Message ID: @.***>

benjypng commented 2 years ago
Screenshot 2022-02-03 at 5 43 09 PM
richd67 commented 2 years ago

Yes but I was about to redo it again and when I select OAuth 1.0a it asks for Callback URI, Website URL?

benjypng commented 2 years ago

You can just use https://www.twitter.com for both URL fields. Ensure that you enable both read and write permissions, and your settings should look like the screenshot above.

On Thu, Feb 3, 2022 at 5:45 PM Prof D @.***> wrote:

Yes but I was about to redo it again and when I select OAuth 1.0a it asks for Callback URI, Website URL?

— Reply to this email directly, view it on GitHub https://github.com/hkgnp/logseq-tweet-plugin/issues/2#issuecomment-1028794495, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNXKGJVLOFKNK75XRMMTELUZJFFDANCNFSM5NBCQWIQ . You are receiving this because you commented.Message ID: @.***>

richd67 commented 2 years ago

I have just noticed that my access token has a comment of read only?? But having taken your advice it is now read/write. I will update my settings in the plugin and test. Thanks

richd67 commented 2 years ago

Yes that works perfectly now Thanks again