06-20-2022 11:15 AM - edited 06-22-2022 04:16 PM
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?
11-11-2022 12:27 PM
I'm on chat with shipstation now. figured they might be able to something regarding that on their end. hopes aren't too high, but worth a shot since we've gotten this far
11-11-2022 12:37 PM
2.3.1 has issues with null values which were caused by changes made in PHP 8.1. My code changes simply replace null values with empty string and eliminates the error. The error with not importing some orders may be coming from the getInternalNotes function in Export.php. With the stock code, ShipStation tries to trim whitespace from null, and that throws an exception. Try opening one of the orders that won't import and add a comment. It should import after that.
11-11-2022 12:35 PM
Ok. We are set, as far as I know. I did not have to apply your fix. I still have debug enabled and there are no errors. I have yet to post anything back to magento from shipstation (from shipping orders), but at least this can get the operation going.
Shipstation chat/help is able to do a different sort of refresh from their end. They did this and it picked up the missing orders.
11-11-2022 12:45 PM
You never answered my question regarding having index.php in your URLs. That caused issues for me and ultimately I wrote a script to receive request from ShipStation outside of Magento and resend them with cURL to the correct endpoint. Prior to that, I wasn't getting any updates to the orders in the store. Other people don't seem to have that issue though and I wonder if it's something support could have fixed. Not wanting to install my code is fine. You can also go through this thread and somewhere I show the lines of code which need to be changed.
11-11-2022 12:53 PM
I did reply somewhere along the lines in this thread. I'm not terribly keen how they lay it out.
I do not have index.php in my urls, however if I visit site.com/index.php the site will load.
I saw the change you made. I'll go look through the code of the module just installed to see if they somehow slipped that in there.
11-11-2022 12:59 PM - edited 11-11-2022 01:00 PM
My site will still load if I go to mysite.com/index.php but the shipstation api wouldn't work. If you look at your SSL log, you may see 404 errors to /index.php/api/auctane?action=shipnotify. That is what causes them. I'm also not too keen on how this forum is laid out. It's a bit hard to navigate. Anyway, I'm glad you got it working. If you have any more issues, let me know.
11-11-2022 01:08 PM
Interesting. I'll look at the ssl logs and see. You have been an absolute godsend. I can't thank you enough. If I can buy you a "proverbial beer" let me know. It would be my pleasure.
11-11-2022 01:12 PM
You're welcome. I wouldn't have much if not for all the people who helped me along the way, so I do my part to help others when I can. I consider it paying it forward.
11-11-2022 08:33 PM
I try to do the same as well.
There are a couple bugs with the module that I have noticed after processing a day and a half worth of orders.
Amazon Pay orders to not get updated/notified in magento. It says in shipstation that the marketplace was updated successfully, however the status never gets updated in magento and then therefore the shipment email from magento is never sent.
The other issue is when you ship a product that doesn't have enough inventory listed in magento, you will get same issue as amazon pay. It will say that the marketplace was notified successfully, but it indeed was not. Fixing the inventory in magento, running cron, and then pushing the notification to magento again will then update the order properly. The shipstation module use to fail to notify and give an error on such an instance.
11-11-2022 08:45 PM
Can't help with the Amazon Pay because my payment processor doesn't support it. I wish they did. I don't have my store configured to allow out of stock orders, so I don't have an answer for that either. As for not updating the stores, check your SSL log for 404 errors to /index.php/api/auctane?action=shipnotify. If you see them, it's because they are trying to reach your API at index.php, and that won't work. You can load the store pages with index.php in the URL because Magento rewrites the URL with .htaccess, but that won't work with the APIs. I wrote a script to receive the notifications outside of Magento and resend them to the API without index.php in the URL. Tech support may be able to change the URL if that is the issue though.
11-11-2022 08:49 PM
I'll look into it more as I have time. The major crisis is over. All other orders updated just fine.
Amazon pay is its own processing standalone setup. It is great and I've definitely seen it get more traction with users using it over the last couple years.
11-11-2022 08:52 PM
I'm going to look into the Amazon Pay now. It was a nightmare getting Google Pay to work, but it was worth it. The more payment methods the better.
11-11-2022 08:55 PM - edited 11-11-2022 08:57 PM
Amazon pay was actually very easy. Create your amazon pay account over at amazon and input the credentials and you're done. I think the amazon pay module is a marketplace module now and not included. It used to be a part of magento, but they did away with that, I think, in the last year or so.
I had google pay setup and I thought it was working (through braintree), but I must need to complete something else on google's end. It'll be something I look at again when I have some more time. For now, I just disabled it as to not confuse people and have less rss loading.
If you don't mind me asking. What do you do for your dev/test store? I don't host my store locally, for obvious reasons, but I have all sorts of server power available to me for local installs.
11-11-2022 09:06 PM
There was a bug in Braintree's Google Pay implementation. They just fixed it with the version that comes with Magento 2.4.5. I had spent a couple days debugging their code and about had it figured out, and then Gene released a new version on Github. I downloaded it and swapped out the bad files, had to rename a couple of variables from Magento-something to Braintree-something, and then it worked.
11-12-2022 11:54 AM
It doesn't look like there will be another release until March. I may update to 2.4.5 before then. It would be nice if shipstation would fix the amazon bug. That will definitely cause a waste of time each day.
11-12-2022 11:54 AM
@lighthouseleds wrote:If you don't mind me asking. What do you do for your dev/test store? I don't host my store locally, for obvious reasons, but I have all sorts of server power available to me for local installs.
I have a Dell 7740 Precision workstation with dual Xeons and 64GB ram which I use for software development. I write a lot of custom software to simplify managing a website and eBay store. I just have a Magento install on there and can test most things before going live on my site.
11-14-2022 07:12 AM
Hey there!
Thank you so much for sharing your knowledge with the community! We absolutely love to see members helping each out!
The collective knowledge of this community is immense and your participation is greatly appreciated! Team work makes the dream work 🙂
11-12-2022 11:57 AM
Do you simply have a VM setup with the same OS and stack as the site you're "managing"?
11-12-2022 12:10 PM
@lighthouseleds wrote:Do you simply have a VM setup with the same OS and stack as the site you're "managing"?
I'm just running it on an Apache server on Windows. My site is Centos7. Aside from it being a pain to get things set up on Windows, and having to know different commands, I haven't had any issues. I'm not really doing anything which would be dependent upon a specific OS.
11-14-2022 08:08 AM
Hello Swappart, I just updated the theme on my website which cause me to have to do a complete database overwrite. I dont know why this is causing issues with shipstation because the development site was a copy of the original where we made the changes. I have checked all the files that I previously changed and they are how we left them. So im not sure why I cant get them to import. I have look through the entire thread and have double checked everything we did last time. If you have any suggestions that would be great.
My store shows that is is connected in shipstation.
No Errors Show.
I have Attributes selected for export.
I have double checked line 312 in export.php
In my shipping log is the following:
[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.
11-14-2022 10:59 AM
Also found the following errors in the acutane_api.log
[2022-11-14T14:11:21.818599+00:00] auctane_api.ERROR: Deprecated Functionality: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /chroot/home/a3938f96/fusionfirearms.com/html/vendor/auctane/api/Model/Action/Export.php on line 312 [] []
[2022-11-14T17:10:21.219709+00:00] auctane_api.ERROR: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /chroot/home/a3938f96/fusionfirearms.com/html/vendor/auctane/api/Model/Action/Export.php on line 485 [] []
11-14-2022 11:40 AM
@TSFUSION wrote:Also found the following errors in the acutane_api.log
[2022-11-14T14:11:21.818599+00:00] auctane_api.ERROR: Deprecated Functionality: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /chroot/home/a3938f96/fusionfirearms.com/html/vendor/auctane/api/Model/Action/Export.php on line 312 [] []
[2022-11-14T17:10:21.219709+00:00] auctane_api.ERROR: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /chroot/home/a3938f96/fusionfirearms.com/html/vendor/auctane/api/Model/Action/Export.php on line 485 [] []
Try the following. Not sure if it will make a difference, but it's a good place to start.
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
11-14-2022 12:13 PM
Just did this and still no change. I replaced the 485 explode line but I'm really not good at any of this stuff I've just been searching online and trying different things to see if it works but this didn't do anything.
Original: $attributeCodes = explode(',', $this->_attributes);
New: $attributeCodes = explode(',', $this->_attributes ?? '');
11-14-2022 12:25 PM
@TSFUSION wrote:Just did this and still no change. I replaced the 485 explode line but I'm really not good at any of this stuff I've just been searching online and trying different things to see if it works but this didn't do anything.
Original: $attributeCodes = explode(',', $this->_attributes);
New: $attributeCodes = explode(',', $this->_attributes ?? '');
It looks like you're using a double quotation mark instead of 2 single quotation marks.
11-14-2022 12:29 PM
I think I may have found the problem. When we did the database overwrite the order numbers where a month behind because that's how long it took to develop the new theme. Now it is updating the order numbers with the customers information but not importing as a new order.
Do you know a potential fix for this? I know I can change the order numbers individually but not sure how to make the template change to certain order numbers.
11-14-2022 12:50 PM
@TSFUSION wrote:I think I may have found the problem. When we did the database overwrite the order numbers where a month behind because that's how long it took to develop the new theme. Now it is updating the order numbers with the customers information but not importing as a new order.
Do you know a potential fix for this? I know I can change the order numbers individually but not sure how to make the template change to certain order numbers.
I don't have an answer for that. You may have to manually update them. If the order status is processing, they should import.
11-14-2022 12:56 PM
Thank you for the response. Im just glad I figured out the main issue.
11-14-2022 12:33 PM - edited 11-14-2022 12:46 PM
@TSFUSION wrote:Just did this and still no change. I replaced the 485 explode line but I'm really not good at any of this stuff I've just been searching online and trying different things to see if it works but this didn't do anything.
Original: $attributeCodes = explode(',', $this->_attributes);
New: $attributeCodes = explode(',', $this->_attributes ?? '');
What version of ShipStation are you using? We discovered yesterday that version 2.3.2 in the Magento Marketplace is really version 2.2.4 and is non-functional. I think someone uploaded the wrong file. The latest working version is 2.3.1.
12-08-2022 06:45 AM
We're running magento 2.4.5 with ShipStation module 2.3.2.
We weren't able to connect to the store but in walking through this whole thread we were able to get it to connect, create orders in shipstation and collect shipment tracking information back to magento.
The edits we made were to .htaccess to fix the urls that were being asked for, might not work for all but fixed our issues...
RedirectMatch 301 /index.php/api/auctane /api/auctane
RewriteRule ^/index.php/rest/V1/auctane/configure$ /rest/V1/auctane/configure [L,R=301,NC,P]
12-08-2022 09:25 AM
Thank you for the information! This thread has been invaluable! It is baffling that shipstation/auctane can not make a robust module for their shipstation platform. I mean, how else are we supposed to use their service(s)??? It only seems in their best interest to actually create a good integration module and keep it up.
12-08-2022 09:45 AM
Hey everyone!
We absolutely love seeing all this teamwork helping your fellow shipstationers out! This is the strength of the community in full swing.
Team work make the dream work!
12-23-2022 10:28 AM
I had tried a RewriteRule redirect to get rid of the index.php, but it lost the POST values. Perhaps RedirectMatch works differently. I also made my changes in the vhosts.httpd file, not .htaccess. It's possible the Magento .htaccess was just overriding the changes or something.
12-22-2022 01:07 PM
@Swappart Just wondering if you are using the Amazon MCF extension on your Magento store? I recently installed it and there is a undefined variable error. I know that this should be a simple fix, but I'm not familiar enough with PHP to fix it.
The Amazon extension developers are MIA, I already had to fix an issue prior to this one with the extension.
Thanks
12-23-2022 10:20 AM
I don't use Amazon MCF, so I wouldn't be able to help with that.
02-22-2023 09:53 AM
Hello Swappart,
I am having the same issue again. I am getting a 500 internal server error. I tested and deselected the export custom attributes and then the connection shows no errors and "updates" but no orders come through.
[2023-02-22T06:22:47.400589+00:00] main.ERROR: [SHIPSTATION] From: Auctane\Api\Model\Carrier\Shipping [] []
[2023-02-22T06:22:47.401108+00:00] main.ERROR: [SHIPSTATION] Status Code: 400 [] []
[2023-02-22T06:22:47.401214+00:00] main.ERROR: [SHIPSTATION] URL: https://integration.shipengine.com/magento/deliveryoptions [] []
[2023-02-22T17:31:58.922514+00:00] main.ERROR: [SHIPSTATION] Response: {"request_id"","errors":[{"error_source":"shipengine","error_type":"validation","error_code":"bad_request","message":"The JSON value could not be converted to System.String. Path: $.items[0].weight.value | LineNumber: 0 | BytePositionInLine: 490.","field_name":"$.items[0].weight.value","field_value":"null"}]} [] []
This is what I see in the shipping log.
[2023-02-22T17:39:47.735015+00:00] auctane_api.ERROR: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /home//html/vendor/auctane/api/Model/Action/Export.php on line 494 [] []
This is in the auctane_api.log
03-21-2023 04:05 AM
Hi,
Great input on this thanks to all.
Magento 2.4.5. + Extension 2.3.2.
Fixes mentioned to code and store to get a 'connection'.
I have tried the .htaccess tweaks (which I assume are the store root .htaccess file) this has made no difference.
RewriteCond %{REQUEST_URI} ^/index.php/
RewriteRule (.*)index\.php/(.*) /$2 [L,R=307,NC,QSA]
The Shipstation Admin appears to drop the Api key and store url after "Testing Connection", when you go back to it. Although as noted below, there seems to be a connection......
The Shipstation Admin reports, after updating stores;
An error occurred attempting to update orders: The remote server returned an error: (500) Internal Server Error.
On the server, the log reports;
34.243.220.209 - - [21/Mar/2023:10:35:52 +0000] "GET /index.php/api/auctane?action=export&start_date=03%2f14%2f2023+02%3a35&end_date=03%2f22%2f2023+03%3a35&page=1 HTTP/1.0" 200 196248 "-" "-"
.......
34.243.220.209 - - [21/Mar/2023:10:35:59 +0000] "GET /index.php/api/auctane?action=export&start_date=03%2f14%2f2023+02%3a35&end_date=03%2f22%2f2023+03%3a35&page=5 HTTP/1.0" 500 6077 "-" "-"
Any pointers greatly appreciated.
Cheers,
03-21-2023 08:28 AM
Shipstation "Support" have advised that I downgrade to Magento 2.4.3. !! Which is a version that was launched Aug 2021, with end of life Nov 2022. Impossible and embarrassing to even suggest such a solution.
The main impact here is probably php 7.4 => 8.1 - which I think most have hacked in the code to fix. The connection issue I and others are having, is probably the same as those with Mag 2.4.3. + extension 2.3.1 which is hopefully more tweaks of .htaccess ........
03-21-2023 08:44 AM
In case it helps, the following entered into the browser (taken from the server log);
site.co.uk/index.php/api/auctane?action=export&start_date=03%2f14%2f2023+02%3a35&end_date=03%2f22%2f2023+03%3a35&page=1
Returns
<?xml version='1.0' encoding='UTF-8'?><fault> <faultcode>401</faultcode>
<faultstring>Authentication failed</faultstring>
</fault>
I think this means that Shipstation is getting to the store ok. I am not sure how I can test sending the api key, since I guess this cannot be passed via the Url
03-21-2023 01:51 PM
For the benefit of others on this, you really are on your own, Shipstation support is just not interested.
1) I have advised them that when I put my Magento Api key and store Url into the Shipstation Connector (i.e. at https://ship8.shipstation.com/settings/stores) test connection (pass), when I return the fields are empty i.e. not saved
2) My server is receiving the connection (I can see in the logs). Shipstation is getting the error I noted earlier.
3) Their response is to downgrade to Magento 2.4.3. and just ignore the issue.
4) After some hacking I have used Postman Api to do a test Get "store-url.co.uk/index.php/api/auctane?action=export&start_date=03%2f14%2f2023+02%3a35&end_date=03%2f22%2f2023+03%3a35&page=1with the Header Auth Key = "ShipStation-Access-Token" and Value {my-magento-api-key}
5) I get xml order data back no problem!!!
This confirms that it is a Shipstation issue i.e. not passing the Api key (which was entered but not save as noted in 1) above.
Does anyone know a way of getting through to a level 2/senior support at Shipstation, to fix my account problem?
Thanks
03-23-2023 08:31 AM
We face the same issues been using Shipstation for years, upgraded to Magento 2.4.5 php 8.1 error shows up in admin
Deprecated Functionality: error_log(): Passing null to parameter #1 ($message) of type string is deprecated in /home/maxed4/public_html/vendor/auctane/api/Model/NoConfigNotification.php on line 32
Exception in /home/maxed4/public_html/vendor/magento/framework/App/ErrorHandler.php:62
log auctane_api.ERROR: Deprecated Functionality: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /home/maxed4/public_html/vendor/auctane/api/Model/Action/Export.php on line 494 [] []
Shipstation seems not to be interested in fixing this and Magento keeps pushing developers to upgrade.
Maybe they don't need Magento 2.4.5 customers. We have multiple sites so won't be upgrading those until they get this fixed.
I tried the ShipStationFixer with no luck.
Anyone know how to fix this?