cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4 extension not working (Solved)

Swappart
Contributor

Trying to integrate Shipstation with Magento 2.4.4. The extension is version 2.3.1 from the Magento marketplace. I'm getting the following error in the admin area.

 

Deprecated Functionality: error_log(): Passing null to parameter #1 ($message) of type string is deprecated in /home/public_html/magento/vendor/auctane/api/Model/NoConfigNotification.php on line 32

 

Looking at NoConfigNotification.php, I can see the configuration is supposed to be done from my shipstation.com account. I have tried setting up the store integration there, but I get a 404 error. I can see the APIs in swagger. I'm able to manually hit the GET API (v1/auctane/configure). I figured out from looking at Authenticator.php that I needed to pass 'ShipStation-Access-Token' in the header with the generated api key as it's value. I tried with cURL and get a 200 OK. I'm also able to hit the POST API and pass dummy values which make the above error go away. So, it seems the APIs are working. I'm not sure why Shipstation is getting a 404. Any ideas how to get this working?

113 REPLIES 113

This is what it shows.

[2022-11-11T04:47:07.876494+00:00] main.DEBUG: item Product Type simple [] []
[2022-11-11T04:47:07.876760+00:00] main.DEBUG: Product Type simple [] []
[2022-11-11T04:47:07.876821+00:00] main.DEBUG: Per Product Rate 19.950000 [] []
[2022-11-11T04:50:42.100203+00:00] main.DEBUG: item Product Type simple [] []
[2022-11-11T04:50:42.100654+00:00] main.DEBUG: Product Type simple [] []
[2022-11-11T04:50:42.100729+00:00] main.DEBUG: Per Product Rate 19.950000 [] []

 

There is a lot of them all the same.

Did you guys get this to actual work properly on 2.4.4. I am on 2.4.4-p2 and this integration is not working now. I am on module version 2.3.2. I am doing my best with shipstation's development team, but my hopes are not high and this completely puts a halt on our operation. It was unfortunate because it said it was connected and syncing upon doing testing after upgrading to 2.4.4-p2, so we had no idea it was not actually working. 


@TSFUSION wrote:

I just look and got 1 order out of around 60 to import to ship station.

 

This was the error that I had in the backend which is above in the thread. I think why it didn't work for me is because not all my products have these custom options..

 

auctane_api.ERROR: Deprecated Functionality: trim(): Passing null to parameter #1 ($string) of type string is deprecated in ~/html/vendor/auctane/api/Model/Action/Export.php on line 312


The error is coming from the getInternalNotes function in Export.php.  That function is looking at the order comment history. You can see that if you view an order, and click Comment History in the sidebar. The issue is the export script is trying to trim whitespace on a null. If an error is thrown, it breaks the script, so the order doesn't export. From the view order information tab, scroll down and try adding a comment to one of the orders and see if it imports it.

jeremiah_lchh
Contributor

I'm having trouble with getting Shipstation to notify Magento 2.4.3 when an order is shipped... any advice?

 

Also, I have set Shipstation to send an order shipping confirmation to the customer, and BCC'd myself, but they don't seem to be sending to the customer, anyone else experienced this?

 

Shipstation does not seem to know what they are doing when it comes to Magento...

So we're having a similar problem... The first error was a mysterious , (comma) appeared after our email address. So when attempting to send the notification it was generating an error about an invalid ID... we removed the , and got rid of that error. Then we started poking around and found the following:

This email is pending. Resend Verification?

And we clicked on the Resend Verification and this popped up:

ShipStation can send outbound shipment confirmation notices from your email address, but we first need to verify ownership of the email account.

In order to utilize your email address as a sending address, we will send an email to your address with a link to follow.

You must follow the brief instructions in the email in order to verify your address.

Click the "Send Confirmation" button to send the confirmation email to sales@xxxxxxxxxxxxx.com


And guess what we never received? You guessed it... the verification email never arrived. We tried it a few times and it's been hours. We even turned off SPAM ASSASSIN and checked all the Junk / Spam folders. We even tried it with a different address. We still never got a verification.

So we have to rule out that our emails aren't being sent simply because the email address hasn't been verified before we dig any deeper. An email was sent to Support but I don't expect much in the way of help.

Aloha

Partial Success...

Do you have a Manual Orders "store" setup yet? If so... tinker with that for testing. I setup the Manual Orders just like the standard Store and was able to create a test order AND get it send out a Fulfillment Notification.

Created Order
Marked As Shipped
Selected USPS as Carrier
Entered fake Tracking Number
Submitted
Notification email received as expected.

So now we're going to mirror the settings in the Manual Orders "store" to the Primary Store

Aloha

I haven't tried this yet, although I can send and receive the test email from Settings->Templates->Email Templates. I would say this is an issue with ShipStation, and is not related to the magento extension. Personally, I would sooner send my own emails from Magento when orders are updated. I don't know if Magento has that function natively, but if not, I'm sure there's an extension for it.

The test email works fine for me as well, the actual one isn't working. 

 

I wanted to use the Shipstation email, that way I don't need to install another extension. 

I don't have that set up, I should maybe try that... thanks😃


@jeremiah_lchh wrote:

I'm having trouble with getting Shipstation to notify Magento 2.4.3 when an order is shipped... any advice?

 

Also, I have set Shipstation to send an order shipping confirmation to the customer, and BCC'd myself, but they don't seem to be sending to the customer, anyone else experienced this?

 

Shipstation does not seem to know what they are doing when it comes to Magento...


I experienced this issue yesterday. In my logs, I saw a 403 on ShipStation's attempt to update the store via POST a request. That's odd, because it's the same API with just a different action. My store is new and I've only had 1 real order, so testing this is a bit difficult. I'm able to hit the API myself and it seems to work. I just did a test order and marked it as shipped, and ShipStation was able to update the store. It also sent me a notification email. If you're still having this problem, check your server ssl log and see if it's getting a 200 status code, or something else.


@jeremiah_lchh wrote:

I'm having trouble with getting Shipstation to notify Magento 2.4.3 when an order is shipped... any advice?

 

Also, I have set Shipstation to send an order shipping confirmation to the customer, and BCC'd myself, but they don't seem to be sending to the customer, anyone else experienced this?

 

Shipstation does not seem to know what they are doing when it comes to Magento...


Just discovered that there's a way to make ShipStation write the ship notifications to a log for debugging.

 

Enable debugging: 

 

 

bin/magento auctane:api:debug 1

 

 

 

Disable debugging:

 

 

bin/magento auctane:api:debug 0

 

 

 

Flush cache after setting debug mode or it won't work.

Log files will be in <magento install directory>/var/log

lighthouseleds
New Contributor

Did you guys get this to actual work properly on 2.4.4. I am on 2.4.4-p2 and this integration is not working now. I am on module version 2.3.2. I am doing my best with shipstation's development team, but my hopes are not high and this completely puts a halt on our operation. It was unfortunate because it said it was connected and syncing upon doing testing after upgrading to 2.4.4-p2, so we had no idea it was not actually working. 


@lighthouseleds wrote:

Did you guys get this to actual work properly on 2.4.4. I am on 2.4.4-p2 and this integration is not working now. I am on module version 2.3.2. I am doing my best with shipstation's development team, but my hopes are not high and this completely puts a halt on our operation. It was unfortunate because it said it was connected and syncing upon doing testing after upgrading to 2.4.4-p2, so we had no idea it was not actually working. 


I have not upgraded to 2.3.2 yet. I actually was unaware it was available until seeing your post. I am on Magento 2.4.5-p1 and ShipStation 2.3.1. I had problems with ShipStation including index.php in the request URLs. There is no index.php in Magento's URLs, so that resulted in 404s.  I don't know if you are seeing any errors. Somewhere in this thread I mentioned where to look for the log files. Also, look in your server's SSL log and see if you are getting requests like GET /index.php/api/auctane?action=export.

sales142
Contributor

@lighthouseleds 
Yes, it can be made to work just fine under 2.4.4 and it works great under 2.4.5 too. Unfortunately you probably won't get anywhere with Shipstation employees. My assumption after dealing with this is Shipstation hires an outside agency to handle their Magento 2.x integration. Nobody on staff at Shipstation was ever able to assist us. Our success eventually came about through trial and error and the ability to bounce ideas off @Swappart.  If you start at the 1st post of this thread and work your way down the solution is in here.

 

Aloha


@sales142 wrote:

My assumption after dealing with this is Shipstation hires an outside agency to handle their Magento 2.x integration.


Your assumption is correct. They use a company called Auctane for their Magento integrations.

I read through the post completely last night. Basically, the solution is to make sure an attribute is set to export in the magento side of shipstation configuration, right?

 

Was this required as well? 

 

if (empty(trim($internalNote->getComment() ?? ''))) continue;

 

edit: thank you both for replying. This is a hugely urgent issue and you've provided me a glimmer of hope. My module says 2.3.2, however I have doubts because my html/vendor/auctane/api/Model/Action/Export.php is different than what is shown in the above line (I don't have that same line). Is there a way to get a copy of the module you guys are actually using? I am also going to remove the current one in magento and reinstall with composer. Shipstation does very strange thing. I have had them send me modules with all sorts of version numbers and even same version numbers but "they are different". Having a copy of one that is actually working for you guys would be amazing in case the one composer pulls is somehow different now from what you have.

I'll see if I can get 2.3.2 installed on my test server so I can look at the code. My guess is they probably fixed some of the issues mentioned in this thread.

lighthouseleds
New Contributor

@Swappart Thanks! I think I'll start off with installing 2.3.1 or 2.3.2 and do the adjustments and see what happens. I did not have a "shipping log" in var/log.

lighthouseleds
New Contributor

Here are the release notes for 2.3.2. It doesn't seem they fixed those issues, but who knows. I tried to download the extension directly, but magento doesn't seem to allow that anymore.

 

2.3.2:

  • Compatible with Open Source (CE) : 2.3 2.4
  • Compatible with Commerce on prem (EE) : 2.3 2.4
  • Compatible with Commerce on Cloud (ECE) : 2.3 2.4
  • Stability: Stable Build
  • Description:

    - Fix issue with carriers not importing

Did you have a previous version working with your current ShipStation account? One thing I figured out when I was going through this was that ShipStation doesn't send the required configurations until you setup the Checkout Rates in your ShipStation account. In your ShipStation account Click the gear icon > Selling Channels > Store Setup > click the 3 dots beside your store > Edit Store Details > Checkout Rates. Set up your rates, then save. ShipStation will then send configuration details to your store.

lighthouseleds
New Contributor

I updated from 2.4.3-p3 to 2.4.4-p2 and shipstation integration quit working.

 

I went to look at the checkout rates as you suggested. Interestingly it gives me the below.

 

Checkout Rates
The Checkout Rates feature lets you control what services and rates your customers can select during checkout from your store. To calculate rates, this feature uses:
The product weights provided by Magento
Your ShipStation default warehouse: Business_Ship
The version of the ShipStation plugin installed on your Magento store does not support Checkout Rates.
Please update to the latest version of the plugin available in the Magento Marketplace. Checkout Rates is supported for Magento version 2.3.4 and higher.

 

 

Ok, now we're getting to the root of the problem. ShipStation isn't reaching your store. Are you able to connect when you enter your store URL and API key in the edit marketplace connection popup? It's under the same 3 dots.

When I do that it says connected/verified when I test connection. Then I click save. 

 

From there if I manually try to sync it then says: Error Updating "see more", which then takes me to 500 error, but they never seem to actually be of current time (not sure if time zones are different)

 

The fact that I don't have the same Export.php file as you makes me thing somehow my module is OLD with a newer version number. idk, just seems to be the only explanation for that.

Can you find your server's SSL log? If you don't know where to look, let me know what OS your server runs. i.e., Centos, Redhat, etc.

I just made an interesting discovery after installing ShipStation 2.3.2 from the Magento Marketplace on my test server. When I look at module.xml, it's actually showing that it's really version 2.2.4. That may be the problem. Try going back to 2.3.1.

lighthouseleds
New Contributor

Thanks. I'll head back to 2.3.1. I should be able to get to work on that in about 30 mins. It is debian

 

34.200.10.239 - [10/Nov/2022:23:24:15 +0000] "GET /index.php?action=export&start_date=11%2f10%2 f2022+14%3a33&end_date=11%2f11%2f2022+15%3a24&page=1" 500 0 - 5845 24005 0.228 14680064 74.45% 13.14% "/index.php/api/auctane?action=export&start_date=11%2f10%2f2022+14%3a33&end_date=11%2f11 %2f2022+15%3a24&page=1"
 
Apache: 
34.200.10.239 - - [10/Nov/2022:23:24:15 +0000] "GET /index.php/api/auctane?action=export&start_ date=11%2f10%2f2022+14%3a33&end_date=11%2f11%2f2022+15%3a24&page=1 HTTP/1.1" 500 617 "-" "-"

Do you have index.php in your Magento URLs? I don't and that resulted in an issue for me.

lighthouseleds
New Contributor

Now that I am thinking about this. What would be the best way to actually remove the shipstation module from mangento and reinstall 2.3.1.

 

Seeming, the following command to install: 

composer require auctane/api:2.3.1 --no-update

 

Edit: I do not have index.php, however that same url has been used for quite some time without issue. I am able to go to site.com/index.php and it will load the site, so I think it will load/respond. 

I don't include the --no-update flag when I do it.  I do the following for any extensions.

 

composer require auctane/api 2.3.1
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento c:f

 

What would you recommend for removing the current version that is there, supposedly 2.3.2? 

composer remove auctane/api 2.3.2

If that doesn't work, then manually change it to 2.3.1 in your composer.json and delete composer.lock

Once you get back to 2.3.1 download my ShipStationFixer extension and put it in app/code. It will solve all the code issues in 2.3.1. I haven't tested on any other versions.

https://www.swappart.com/shipstation/ShipStationFixer.zip 

Thanks! Working on it all at this very moment. Fingers crossed.

That extension should solve your 500 error. There could still be other issues to address after. Also, after installing it, go back to Checkout Rates.

Will do. almost there

Don't forget the following to properly install the extension.

 

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento indexer:reindex
php bin/magento c:f

Got it! I thought to try an import before applying your fix. It imported orders, howoever there is a block of orders from yesterday that did not import.

 

I may try to apply your fix now and see if that resolves that issue.

 

I was able to setup a checkout rate. I did that and then just left is as NOT active since I don't care to use it. I have a custom attribute set to export as well.

Cool. Making progress.

Ya know. I think the orders that didn't import are when the connection was still "successful" but nothing was importing into shipstation (seemingly). I wonder if they were being flagged as imported on shipstation side or magento's side. Any idea on this so that I can get them to import?

 

The time which the orders have not imported seems to coincide with when I finally started getting a 500 error on shipstations side. I think shipstation thinks those orders have been imported.

 

my app/code folder is actually empty. Would that be dropped in to be merged with vendor/auctane/api ?

It should still get them if they're not displaying in ShipStation.