Strange error message - getBible global options #475

Closed
opened 2019-09-09 13:40:43 +00:00 by jonasborneland · 7 comments
jonasborneland commented 2019-09-09 13:40:43 +00:00 (Migrated from github.com)

Steps to reproduce the issue

Go to /administrator/index.phpoption=com_componentbuilder&view=import_joomla_components&target=smartPackage

Expected result

Error with a clear description on where to put to access token.

Actual result

Error with message:
You can add an access token to getBible global options to make authenticated requests. An access token with only public access will do.

System information (as much as possible)

  • OS Name & Version: windows 10
  • MySql Version: 5.5.5-10.3.17-MariaDB-1:10.3.17+maria~bionic
  • Apache Version:
  • PHP Version: 7.2.22
  • Joomla Version: Joomla! 3.9.11 Stable [ Amani ] 13-August-2019 15:00 GMT
  • JCB Version: 2.10.1
  • Browser: Edge / Chrome (tried both)

Additional comments

What and where is "getBible global options" ? In other words, where do I add the access token? :)

### Steps to reproduce the issue Go to `/administrator/index.phpoption=com_componentbuilder&view=import_joomla_components&target=smartPackage ` ### Expected result Error with a clear description on where to put to access token. ### Actual result Error with message: You can add an access token to getBible global options to make authenticated requests. An access token with only public access will do. ### System information (as much as possible) - OS Name & Version: windows 10 - MySql Version: 5.5.5-10.3.17-MariaDB-1:10.3.17+maria~bionic - Apache Version: - PHP Version: 7.2.22 - Joomla Version: Joomla! 3.9.11 Stable [ Amani ] 13-August-2019 15:00 GMT - JCB Version: 2.10.1 - Browser: Edge / Chrome (tried both) ### Additional comments What and where is "getBible global options" ? In other words, where do I add the access token? :)

What package did you try to import? did you watch the tutorials on how to import a JCB package?

The error is weird since I don't think we have getBible linked to any package... well it could be a shared note that I mistakenly updated that is used in both JCB and getBible.

But lets start with what package you tried to import.

What package did you try to import? did you watch the tutorials on how to import a JCB package? The error is weird since I don't think we have getBible linked to any package... well it could be a shared note that I mistakenly updated that is used in both JCB and getBible. But lets start with what package you tried to import.

O yes and before I forget... please use Firefox when working in JCB GUI.

I build JCB on Linux in Firefox just for my own use, but have since 2015 started sharing it with the larger Joomla community. Who has from time to time run into quarks due to my development environment. So for best experience try to get as close to my environment as is possible to you.

Here is a little video on using the Bitnami stack, which has become sort of the standard for JCB.

O yes and before I forget... please use **Firefox** when working in JCB GUI. I build JCB on Linux in Firefox just for my own use, but have since 2015 started sharing it with the larger Joomla community. Who has from time to time run into quarks due to my development environment. So for best experience try to get as close to my environment as is possible to you. Here is a little video on using the [Bitnami stack](https://www.youtube.com/watch?v=zpS52k89YcI&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=73&t=0s), which has become sort of the standard for JCB.
jonasborneland commented 2019-09-09 16:42:32 +00:00 (Migrated from github.com)

I tried several. It’s the same getBible massage on them all :)
And yes I watched the tutorial, but this comes as soon as I open the import view

Den 9. sep. 2019 kl. 18.02 skrev eweyn notifications@github.com:

What package did you try to import? did you watch the tutorials on how to import a JCB package?

The error is weird since I don't think we have getBible linked to any package... well it could be a shared note that I mistakenly updated that is used in both JCB and getBible.

But lets start with what package you tried to import.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I tried several. It’s the same getBible massage on them all :) And yes I watched the tutorial, but this comes as soon as I open the import view > Den 9. sep. 2019 kl. 18.02 skrev [[ewe]]yn <notifications@github.com>: > > What package did you try to import? did you watch the tutorials on how to import a JCB package? > > The error is weird since I don't think we have getBible linked to any package... well it could be a shared note that I mistakenly updated that is used in both JCB and getBible. > > But lets start with what package you tried to import. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub, or mute the thread.

Do you have curl turned on?

Please send me a screen-shot of the error message.

Do you have curl turned on? Please send me a screen-shot of the error message.
jonasborneland commented 2019-09-10 06:50:18 +00:00 (Migrated from github.com)

Yes, and It's on a shared host. But I don´t have the error on a bitnami stack I just installed. So that solved it :)

Anyways, where do I put the access token if I have to?

image

Yes, and It's on a shared host. But I don´t have the error on a bitnami stack I just installed. So that solved it :) Anyways, where do I put the access token if I have to? ![image](https://user-images.githubusercontent.com/6105278/64590617-41000e80-d3a8-11e9-8948-30eccd6f27ca.png)

For this area to work (import of JCB packages), it makes API calls to github. If you have other applications who also made calls from the same IP (if shared host - other clients on the same host) then github will reach its limit on free unofficial calls, and will start asking for a token, and that triggers this warning.

The error is also used in another component I build called getBible so I need to fix that message to be more JCB related (that is why I asked for a screenshot). At this time JCB does not have a place to add a token, since the amount of calls it makes is very low that we have hardly ever seen this error come up (well I have never seen it and I use JCB everyday). But I guess the time has come to add it in and give better instructions in the message. Everything for it is ready (back-end) we simple need to add it to the GUI.... so I will push it out on the next release.

I just when over the code and found where I should fix the message:
image

So it is in a helper method called githubErrorHandeler that is used in both JCB and getBible as you can see above.

For the future, the global options of any component is found at the top right corner in any of its list admin views. The button that says [options]
image

So looking at the code you reached the API free limit on that shared host, so that error came up to have you add a token for which JCB at this time did not have a field... but will soon, with better message 👍

For this area to work (import of JCB packages), it makes API calls to github. If you have other applications who also made calls from the same IP (if shared host - other clients on the same host) then github will reach its limit on free unofficial calls, and will start asking for a token, and that triggers this warning. The error is also used in another component I build called [getBible](https://getbible.net) so I need to fix that message to be more JCB related (that is why I asked for a screenshot). At this time JCB does not have a place to add a token, since the amount of calls it makes is very low that we have hardly ever seen this error come up (well I have never seen it and I use JCB everyday). But I guess the time has come to add it in and give better instructions in the message. Everything for it is ready (back-end) we simple need to add it to the GUI.... so I will push it out on the next release. I just when over the code and found where I should fix the message: ![image](https://user-images.githubusercontent.com/5607939/64596816-eb7e2e80-d3b4-11e9-8172-f6d2c4f4ec15.png) So it is in a [helper method called](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/admin/helpers/componentbuilder.php#L2475) `githubErrorHandeler` that is used in both JCB and getBible as you can see above. For the future, the global options of any component is found at the top right corner in any of its list admin views. The button that says [options] ![image](https://user-images.githubusercontent.com/5607939/64597139-7a8b4680-d3b5-11e9-9b26-cb2d0efe756e.png) So looking at the code you reached the API free limit on that shared host, so that error came up to have you add a token for which JCB at this time did not have a field... but will soon, with better message :+1:
jonasborneland commented 2019-09-10 09:19:59 +00:00 (Migrated from github.com)

Okay perfect! That answer all my questions!
Thank you for taking your time to figure it out and help me.

Okay perfect! That answer all my questions! Thank you for taking your time to figure it out and help me.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#475
No description provided.