Magento 2 General System Exception Happened: How To Fix Error During Magento 2 Import

- Magento 2, Our extensions

Magento 2 Development; Magento 2 tutorial

If you regularly deal with Magento 2 import processes, you might have faced the following message: General System Exception Happened. Like other import errors, it prevents you from transferring data to your e-commerce website. What are the causes of the Magento 2 General System Exception Happened issue? How do we fix this import problem? Magento users all over the globe regularly ask these questions. You’ve come to the right place if you are also looking for the corresponding answers.  

In the following post, we try to figure out Magento’s General System Exception Happened error and explain how to fix it. The issue is an inevitable part of the basic Magento 2 import processes associated with the platform’s default tools. Luckily, we know for sure how to address the problem. 

Below, we aggregated a short guide on how to fix the Magento 2 General System Exception Happened issue based on the StackExchange answers. Besides, you will discover a more user-friendly approach to the import that the Firebear team provides. Other useful Magentop 2 tips are gathered here: Developer’s Cookbook.

Table of contents

Magento 2 Import: General System Exception Happened

Once we came across the StackExchange question asked by Stax, who argued that it was impossible to complete a Magento 2 import process due to the General System Exception Happened issue. Although other users described possible solutions, there was another more user-friendly way to avoid the error. According to the discussion, the problem is in the UTF-8 format that should be converted to UTF-8-BOM. So, let’s see how to solve the General System Exception Happened issue.

How to Fix The General System Exception Happened Error in Magento 2

The reason for the “General System Exception Happened” error is the content of your import file. Characters should be coded to UTF-8-BOM. Thus, you always have to do that before importing any data into Magento 2.

  1. Open the CSV in Notepad++;
  2. Go to Encoding;
  3. Convert your file to UTF-8-BOM;
  4. Save it as a copy;
  5. Import the saved file.

The procedure is extremely straightforward, but you have to repeat it before every import. Right, all data files should be encoded to prevent Magento’s “General System Exception Happened” error. So you will have to spend lots of time in a long-term perspective. Do you really want that? If not, let’s find out what is BOM and how UTF-8 differs from UTF-8-BOM and then proceed to a more user-friendly approach to solving the issue.

What Is UTF-8-BOM & How It Differs From UTF-8?

Although there is no official difference between UTF-8 and UTF-8-BOM (Byte Order Mark), it is crucial for the Magento 2 import. The BOM-ed version of a UTF-8 string starts with the three following bytes: EF BB BF. Note that it is recommended to ignore them when extracting the string from the file/stream.

BOM is considered additional information for UTF-8 and could be an excellent way to find out whether a string was encoded in UTF-8. At the same time, it could be a legitimate string in any other encoding. Paercebal provides the following example: [EF BB BF 41 42 43]. It could be either the ISO-8859-1 string “ABC” or the UTF-8 string “ABC”.

This example shows that the first bytes are not always helpful when you want to recognize the encoding of file content. The example string is just a bunch of bytes, so some external information is needed to choose how to interpret it. If you think ISO-8859-1 was used to encode the bytes, then the string is “ABC”. If it was UTF-8, then the string is “ABC”. The BOM could be a clue in case you don’t know the truth.

Protip: An absence of an invalid character when decoded as UTF-8 is another way to find what string you are dealing with. And invalid characters cause the “General System Exception Happened” error. That’s why BOM is required for the Magento 2 import.

Unfortunately, BOM may cause various problems (beyond the import process of course). First of all, if a file with no text is BOM-ed, it is no longer empty because it always contains some additional bytes.

Another issue is related to the ASCII subset of UTF-8. A file is no longer ASCII because the BOM is not ASCII. Such peculiarity makes some existing tools break down. If there is no replacement for them, you will face serious troubles.

And don’t forget that you cannot concatenate several files together because each of them has a BOM at the beginning.

Now, that you are familiar with the reason for our problem, know how to fix it, and understand what BOM is, we can proceed to the preventive measure. If you don’t want to convert files to UTF-8-BOM every time a new import process is required, continue reading this article – you will find a cure for your headaches below.

How to Prevent Magento 2 General System Exception Happened Errors

To prevent the “General System Exception Happened” error, use the Improved Import & Export Magento 2 extension instead of the platform’s default importer/exporter. This module not only helps to avoid the issue but also makes data transfers much faster, provides the ability to automate them entirely, offers multiple ways of data migration, as well as solves the problem of different attribute standards.

If you want to forget about the “General System Exception Happened” error and move your import and export processes to an entirely new level, give it a try. Let’s take a look at what the Improved Import & Export module can do.

Improvements For Default Import & Export of Magento 2

Magento 2 mysql data import

Our extension is designed to revamp the default import and export tools entirely. It not only solves the problem mentioned above but also increases the speed of updates as well as ads multiple features the dramatically improve your admin experience. Below, we shed light on the core module’s characteristics.   

Extended Connectivity Options for Magento 2 Import & Export

One of the most obvious enhancements provided by the Improved Import & Export plugin is a bunch of connection options. Our extension supports multiple connectivity standards that simplify even the most complicated integrations between your Magento 2 website and external systems which can be based on API connections, file transfers, or intermediary services.

Multiple File Standards

It’s not a secret that the Magento platform works with CSV files only. That’s why we’ve been encoding a CSV file at the beginning of this post. The necessity to work with this only format is partially a reason for the problem. A strict limitation that prevents using other file formats forces you to convert all data to CSV (UTF-8-BOM) every time a new update is provided.

Luckily, the Improved Import & Export Magento 2 extension significantly extends the number of supported standards. In addition to CSV, it provides the ability to use XML, JSON, ODS, and Excel files. Consequently, there is no need to convert them to CSV or vice versa. Our module lets you effortlessly transfer data in these formats. Furthermore, you can apply all the extension’s features to all supported standards!

Multiple File Sources

It is necessary to mention that you can choose one of several supported file sources. The Improved Import & Export Magento 2 extension extends the flexibility of every integration with the following connection points:

  • FTP/SFTP. Use a local or remote server to exchange data between your Magento 2 website and an external platform.
  • Dropbox. Use a Dropbox account to exchange data between your Magento 2 website and an external platform.
  • URL. Use a direct URL address to run import processes only.

We’d also like to draw your attention to the fact that the Improved Import & Export Magento 2 extension unpacks compressed data automatically. If an update is provided in an archive, you don’t have to extract it manually. It means that you no longer need to unpack a file, convert it to CSV, and then encode to BOM-ed UTF-8 to prevent the “General System Exception Happened” error – everything is done for you!

Direct Connections

Chances are, you cannot use files to establish all required connections. But there are no reasons to worry since the Improved Import & Export Magento 2 extension provides the ability to connect to an external system directly. The module lets you establish a direct API connection between Magento 2 and any third-party platform that also supports this type of integration. To create the bridge between the two systems, the Improved Import & Export Magento 2 extension lets you use REST, SOAP, or GraphQL APIs.

Intermediary Services

If neither API connections nor file transfers are helpful, you can rely on various intermediary services. Under such services, we assume online sheets. Currently, the Improved Import & Export Magento 2 module provides the ability to leverage the three following platforms: Google Sheets, Office 365 Excel, or Zoho Sheet. Below, you can see how to transfer between your store and an external system using Google’s solution:

Magento 2 Google Sheet import

Automated Import & Export Processes in Magento 2

As we’ve already mentioned, you have to repeat the same procedure of encoding every time a new update is provided. Even if the file is BOM-ed UTF-8, it is necessary to run import manually, which is a time-consuming routine. What alternative solutions do we offer? The Improved Import & Export Magento 2 extension provides two different approaches to making every data transfer independent. You can either create an update schedule or choose an event that will be used as a trigger. Let’s explore each feature separately.

Schedules

Schedule-based updates are very intuitive. The Improved Import & Export Magento 2 extension uses cron to enable the feature. When in the extension’s admin, specify a custom update period utilizing the default cron syntax. Alternatively, you can select one of the predefined intervals, which are fully customizable as well.

At the same time, you have an opportunity to create profiles that have no schedules. Why are they important when you can automate everything? Single data transfers and asynchronous updates are the answer. In some situations, you will need to import data only once or do that in a random order.

And don’t forget that every profile can be launched manually even if it has a schedule. If your partner delays the update, you won’t need to wait until the next planned event. Hit a few buttons, and the Improved Import & Export will do everything for you. The following illustration shows how to configure a schedule:

Events

Events are an alternative way of automating import and export processes. You can even use them to enable real-time updates. It is only necessary to select a trigger when you configure a certain import or export job. Any event can be a trigger; for instance, a customer places an order. It can launch an order data export to an external system, so the data is transferred in real time.

The Improved Import & Export Magento 2 extension lets you both select system events and specify custom processes considered triggers. And it is possible to increase their efficiency by selecting specific conditions. For further information, read this article: How to Run Magento 2 Import or Export After Specific System Event or Process.

Advanced Mapping Features for Importing Third-Party Data to Magento 2

Another issue that prevents fully automated import and export processes is different attribute standards. Since external systems store data in different ways, it is not possible to transfer information between them directly. You always have to modify the external output matching it to Magento 2 requirements.

Luckily, the Improved Import & Export Magento 2 extension offers advanced mapping functionality that substantially simplifies all the related processes. Problems caused by different attribute standards can be efficiently solved right within our module. It lets you modify not only third-party attributes but also their values. Furthermore, you can use the created matching schemes for further import/export processes so that updates are entirely automated.

Mapping Presets

The easiest way to solve the problem of different data standards is based on presets. Our team has created a bunch of mapping schemes that can be applied just within a few clicks. You only have to select a preset suitable for your particular integration. Thus, the Improved Import & Export Magento 2 extension allows matching the external attributes to ones used in Magento 2 in a few clicks only. You select a mapping scheme, and the module scans the input data, analyzes all attributes, and matches all third-party designations to the corresponding ones used internally. Everything is as simple as shown below:

Matching Interface

If you cannot find the necessary preset, the Improved Import & Export Magento 2 extension lets you do everything manually. Of course, you can also rely on our support and ask us for help, but the module offers a special interface where you can easily match attributes manually. The complicated data file editing is reduced to selecting a third-party designation and specifying the appropriate internal one in front of it. You should repeat the procedure for every attribute that differs from the ones used in Magento 2. The process has the following appearance:

Also, note that you can specify hardcoded attribute values via the same interface. On the gif above, you can see the third column called “Default Value” which allows setting a value provided to all items related to the attribute.

Let’s assume that you need to import products related to different store views to one store view. With the Improved Import & Export extension, it is possible to link them to the same destination via the hardcoded value functionality.

Attribute Values Mapping

As mentioned above, similar functionality is possible for both attributes and their values so that you can freely map them. The Improved Import & Export Magento 2 extension uses the same algorithm for modifying the external data as we’ve just described. But third-party values don’t prevent import processes, you will argue. Indeed, they require lots of time and effort for editing after the update is transferred. That’s why we’ve implemented attribute values mapping in our module.

The Improved Import & Export Magento 2 extension provides a powerful feature that is easy to master and use. The provided attribute values mapping is much faster than doing everything manually via a data file or in the Magento admin. You no longer need to apply changes to each product individually working right with attribute values instead. More information is available here: Attribute Values Mapping.

Attribute Values Editing

For the further simplification of your admin duties, we’ve introduced the ability to edit attribute values in bulk. With the Improved Import & Export Magento 2 extension, you can apply one of the following rules:

  • Add a prefix;
  • Add a suffix;
  • Split attribute values;
  • Merge attribute values.

Feel free to combine them and create special conditions to increase efficiency and precision. For further information, read this article: How to Modify Attribute Values During Import and Export in Magento 2.

Category Mapping

And with the Improved Import & Export Magento 2 extension, you can freely map categories. This feature is especially useful when you import products with a different catalog structure. Instead of applying changes to each imported product individually from the admin interface, match the external categories to the ones used internally during the import process:

And you can create new categories on the fly as well. With our module, the process is as simple as selecting a parent category and specifying a name of a new one. For further information, follow this link: Category Mapping.

Attributes On The Fly

And the absence of attributes is no longer a problem since the Improved Import & Export Magento 2 extension allows you to create them on the fly. All the necessary parameters can be specified using the following general form:

Attribute|attribute_property_name:attribute_property_value|…

For further information, read this article: Product attributes import.

The following video shows the Improved Import & Export Magento 2 extension in action:

Magento 2 Improved Import FAQ

Let’s see what advantages you get with Improved Import & Export. 

How can Improved Import & Export help me with my daily Magento 2 duties?

With the Improved Import & Export module, you can automate various data transfers that regularly occur. The extension runs both import and export processes in the background, automating various daily Magento 2 duties, including product catalog updates, order sync with ERP and CRM systems, product information management, etc.

What data can I import and export between Magento 2 and other systems?

With the Improved Import & Export module, you get the ability to import and export all core Magento 2 entities. The extension works with all product types, product attributes, sets, groups, and values, advanced pricing, categories, customer data, orders, tracking codes, documents, such page elements as static blocks and entire store pages, price rules for catalog and cart, gift cards, product reviews, search terms, and synonyms, widgets, URL rewrites, page hierarchy, newsletter subscribers, MSI warehouse data, B2B entities, including companies, company roles, shared catalogs, requisition lists, and negotiable quotes.

What sources can I use to upload files for import?

With the Improved Import & Export module, you can leverage numerous file sources, such as Google Drive, OneDrive, and Dropbox. You can also import data from FTP/SFTP, transfer it by a direct URL, or upload files right to your Magento 2 installation. Furthermore, it is possible to import data from Google Sheets or transfer it between your MAgento 2 website and external systems via API.

What file type can I import to Magento 2?

While Magento operates with CSV files only, the Improved Import & Export extension supports numerous file types. In addition to CSV, it works with XML, Excel XLSX, Open Office ODS, and JSON. You can store them in ZIP or TAR archives.

Can I automate data transfers? Can Improved Import & Export run on schedule?

The Improved Import & Export extension incorporates a cron scheduler that lets you automate all data transfer processes. The plugin allows you to schedule any update for a particular interval.

Can I import data from external systems and platforms if it doesn’t follow Magento 2 requirements?

Of course, you can. With the Improved Import & Export Magento 2 extension, you can transfer any data output into the one suitable for Magento 2. To achieve this goal, the extension offers the attribute mapping interface where you can replace any data in a format incompatible with Magento 2 with designations supported for import. Thus, you inform Magento how to refer an attribute/column from the imported file to the corresponding Magento 2 attribute. Consequently, it is possible to import data in any format from any external system.

How fast does it take to import entities to Magento 2?

Although the data transfer performance depends on numerous factors, on average, the Improved Import & Export Magento 2 extension moves about 3k entities per minute.

Do you offer any additional value along with Improved Import & Export?

When it comes to the additional value that comes along with the extension, you can see the free Product Feeds add-on in our catalog. The tool lets you transfer products from Magento 2 to eBay, Facebook, and Amazon. The MSI add-on is another little something extra that you can use for free.

Are any customizations of Improved Import & Export possible?

The extension’s code is open, so you can apply any customizations to its standard functionality. At the same time, we offer customization services. Ask our specialists for help – they can implement your ideas and recreate the functionality missing for your business.

Do you offer a refund for Improved Import & Export? What period does it cover?

The Improved Import & Export Magento 2 extension comes with a 30-day money-back guarantee. Also, we provide great support services. If you think that our extension doesn’t fit your business, contact our specialists and we will figure out how to address the existing problems.

Is Improved Import & Export secure?

You can trust us since our code and developers are the best of the breed. The Firebear team consists of Magento-certified specialists. Only top-notch developers work on the Improved Import & Export extension. Also, pay heed to the fact that our plugins are available on the Magento Marketplace. It means that they have passed lots of security checks to get there.

What other services do you offer?

Our portfolio consists of the Improved Import & Export Magento 2 extension and numerous other add-ons and modules aimed at improved data transfer functionalities and other areas. Besides, we provide such services as extension customization and integration. In the first case, we help you implement features that your business requires but our extensions lack. As for the integrations, we configure Improved Import & Export to satisfy your data transfer requirements, connecting your e-commerce website to other platforms, such as CRM and ERP systems, and synchronizing data between them.

Final Words

As you can see, the Improved Import & Export Magento 2 extension not only prevents Magento’s “General System Exception Happened” error but also allows solving multiple other import and export issues related to the standard data transfer tools. Our module provides the ability to automate the exchange of information saving tons of time and effort. For further information, follow the link below and contact our support:

Get Improved Import & Export Magento 2 Extension