Fedex Plugin Install Throws Error

  • Posts: 59
  • Thank you received: 4
  • Hikashop Business
3 months 3 weeks ago #362716

-- HikaShop version -- : 5.1.0 business
-- Joomla version -- : 4.4.6
-- PHP version -- : 8.2.22
-- Browser(s) name and version -- : Firefox 129.0.1
-- Error-message(debug-mod must be tuned on) -- : FatalError
HTTP 500 Whoops, looks like something went wrong.
Compile Error: Namespace declaration statement has to be the very first statement or after any declare call in the script

Exception Stack Trace

Symfony\Component\ErrorHandler\Error\ FatalError
in /home/dadutstest3/public_html/plugins/hikashopshipping/fedex2/vendor/composer/autoload_static.php (line 13)

Am trying to use the new Fedex plugin for the first time.

Plugin appears to be installed properly on System>>Plugins (have reinstalled HIksahop 5.1.0 to make sure)

Getting intermittent 500 errors when enabling the plugin.

When it does install I attempt to to to Hikashop>>Products and get the 500 error.


FatalError
HTTP 500 Whoops, looks like something went wrong.

Compile Error: Namespace declaration statement has to be the very first statement or after any declare call in the script

Exception Stack Trace

Symfony\Component\ErrorHandler\Error\ FatalError
in /home/dadutstest3/public_html/plugins/hikashopshipping/fedex2/vendor/composer/autoload_static.php (line 13)

Help ! I;m stuck.

Thanks,

Dave

Please Log in or Create an account to join the conversation.

  • Posts: 82967
  • Thank you received: 13393
  • MODERATOR
3 months 3 weeks ago #362717

Hi,

Thank you for your feedback. I've made a patch for this.
Download again the install package of HikaShop 5.1.0 on our website and install it on yours and it will fix the problem.

The following user(s) said Thank You: daduts

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 4
  • Hikashop Business
3 months 3 weeks ago #362729

Thanks for the quick response Nicolas ...but....still got problems.

Installed the update....(tip for anyone with the same issue....had to disable the fedex plugin to get the install to work.)

Enabled it in System>Plugins

went to Shipping Methods, clicked New, selected to new FedEx plugin

Got an error:

An error has occurred.

0 Attempt to assign property "transit_time" on null

Attached a screenshot.

Thanks for your help,

Dave

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82967
  • Thank you received: 13393
  • MODERATOR
3 months 3 weeks ago #362732

Hi,

Thank you.
I've made another patch for this.
Download again the install package of HikaShop 5.1.0 on our website and install it on yours and it will fix the problem.

The following user(s) said Thank You: daduts

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 4
  • Hikashop Business
3 months 3 weeks ago #362740

Thanks again Nicolas.

Plugin installs properly now but.....still another error when using shopping cart with fedex plugin enabled.

500 error

Call to undefined function GuzzleHttp\Psr7\uri_for()

Error pages attached.

Tried it with both fedex sandbox and production credentials.

shutoff jch and switched to Cassiopia.....same issues.

Thanks

Dave

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82967
  • Thank you received: 13393
  • MODERATOR
3 months 3 weeks ago #362743

Hi,

Thanks again.
This one was a tricky one. It comes from an issue in the Guzzle library:
github.com/guzzle/guzzle/issues/2740
I was able to reproduce the issue and fix it.
I've made a big patch for it in the plugin.
Download again the install package of HikaShop 5.1.0 on our website and install it on yours and it will fix the problem.

The following user(s) said Thank You: daduts

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 4
  • Hikashop Business
3 months 3 weeks ago #362747

Thanks again Nicolas,

That fixed the latest error but I still don't have it working yet.

============================================

Found another possible bug:

My initial effort got the following 500 error:

FedexRest\Services\Rates\CreateRatesRequest::setPickupType(): Argument #1 ($pickupType) must be of type string, null given, called in /home/dadutstest3/public_html/plugins/hikashopshipping/fedex2/fedex2.php on line 345

I remedied this by changing Pickup Type" from "Regular pickup FedEx schedule" to "use scheduled pickup".

=======================================

Once that was fixed.... I get no display in my cart re: FedEx.

- I have two other shipping methods, UPS before FedEx and a manual plugin after FedEx. Both display properly and are the same with FedEx on or off.

- I've turned on system debug, the plugin debug and max errors
I do get a number of warnings and errors but none seem fedex plugin related and they don't vary with the plugin on or off

a couple that might be related.....

Warning: Undefined property: stdClass::$amount in /home/dadutstest3/public_html/administrator/components/com_hikashop/classes/currency.php on line 2040

Warning: Undefined property: stdClass::$amount in /home/dadutstest3/public_html/administrator/components/com_hikashop/classes/currency.php on line 2680

i did verify hikashop config and plugin are both set to $USD.

=========================================

I checked my Fed Ex account. Tried the plugin with both sandbox and production credentials. Nothing changed.

I'd been using the "Rates and Transit Times API". I tried adding the "Comprehensive Rates and Transit Times API" and the "Address Validation API". Nothing changed.

I tried getting the old version of the FedEx plugin working but it gives me nothing as well. I'm assuming it's deprecated as it used to work but stopped working for me sometime in the last several months.

==============================
another thought.....in the old fedex plugin we were using FedEx Ground......that option no longer exists in the new plugin. I;ve tried a variety of the other US options but none return a price.

the vast majority of my client's shipments are BTB. I suspect we need FedEx Ground.

===============================

so once again.....I'm stuck.

Perhaps you could take a look at the site ?

I'll send you credentials via your contact form.

many thanks

Dave

Please Log in or Create an account to join the conversation.

  • Posts: 82967
  • Thank you received: 13393
  • MODERATOR
3 months 3 weeks ago #362753

Hi,

Regarding the fatal error, thanks for your feedback. I've made a patch so that it doesn't happen.

Normally, when you have a shipping method not displaying on the checkout while others are, you want to temporarily disable the others. The checkout will then display the error message coming from the shipping plugin with the reason why it's not displaying it.
So that's the first thing I did with your backend access. However, only the default generic message from HikaShop was displaying. That's because of some other faulty code in the new FedEx plugin. So I've made another patch for it on our end.
Now, with the "debug" setting activated, that same message will be logged in the "payment log file" of HikaShop. So I went there on your website backend and I got this error message at the bottom of the log:
i.imgur.com/JkEqE1w.png

FedEx 2 : no FedEx rates available = DIMENSIONS.LENGTH.REQUIRED : Length is required in dimensions. Please update and try again.

So I check the information of the product I had in my cart on the frontend, and indeed, it didn't had dimensions. I added some random dimensions to it, and now I can see the FedEx shipping methods on your frontend:
i.imgur.com/BPzOGEp.png
So it seems to be working fine.

The following user(s) said Thank You: daduts

Please Log in or Create an account to join the conversation.

  • Posts: 59
  • Thank you received: 4
  • Hikashop Business
3 months 3 weeks ago #362759

Nicolas,

Thanks so much for grinding thru that one.

Fedex seem to be working fine now.

Many thanks

Dave

Please Log in or Create an account to join the conversation.

Time to create page: 0.069 seconds
Powered by Kunena Forum