PhantomJS End-Of-Life

The web driver PhantomJS is no longer developed. As a result, Coveo is ending support for PhantomJS in its Web and Sitemap sources in January 2023. Coveo encourages customers to migrate away from PhantomJS themselves as soon as possible to ensure source content continues to be indexed properly after January 2023.

The other web driver Coveo currently uses, ChromeDriver, is reliable and secure. Since early 2020, ChromeDriver has been the default driver for all new Web and Sitemap sources created in Coveo.

This article guides Coveo customers in migrating their PhantomJS sources to ChromeDriver and provides resources to fix potential issues.

Determine if a Web or Sitemap Source Uses PhantomJS

  1. On the Sources (platform-ca | platform-eu | platform-au) page of the Coveo Administration Console, click a Web or Sitemap source, and then click More > Edit JSON in the Action bar.

  2. With your cursor in the JSON configuration field, select Ctrl+F (Windows) or Command+F (Mac) on your keyboard to bring up the search field.

  3. In the search field, type WebDriver, and then select Enter.

    If the current source uses PhantomJS, you’ll see PhantomJs as the value for the WebDriverType parameter.

    JSON configuration of Web source showing PhantomJS as the web driver

Migrate a Source to ChromeDriver

Summarily, the migration procedure goes as follows:

  1. You first migrate your PhantomJS sources to ChromeDriver in your sandbox organization.

  2. You compare your sandbox ChromeDriver sources with your production organization PhantomJS sources and make any further necessary changes to your sandbox ChromeDriver sources.

  3. The ChromeDriver sources undergo testing in your sandbox organization.

  4. You apply the changes you made in your sandbox organization to your production organization sources.

The fully detailed procedure is provided below.

Important

The following is general information and things to keep in mind when performing the source migration procedure.

  • The procedure makes use of the resource snapshot feature. Resource snapshots will be used to copy (that is, export) your source configurations between your production and sandbox organizations.

  • Along with sources, include fields and extensions in your resource snapshots to ensure you copy all indexing-related resources.

  • Provide meaningful snapshot names that reflect their contents and the organization they were created in (for example, PhantomJS sources with all fields and extensions from production organization).

  • The Potential Issues When Migrating to ChromeDriver section contains a summary of common issues you may face and recommendations on how to fix them.

  • Ask for help if you get stuck.

To migrate your PhantomJS sources to ChromeDriver

  1. In your production organization, locate the Web and Sitemap sources that use PhantomJS.

  2. In your production organization, run a refresh or rescan on the PhantomJS sources you located.

    Note

    This step ensures your production sources are updated ahead of the sandbox and production source comparison phase.

  3. In your production organization Resource Snapshots (platform-ca | platform-eu | platform-au) page, create a resource snapshot containing your PhantomJS source configurations and other indexing-related resources and export the snapshot to your sandbox organization.

  4. In your sandbox organization, apply the snapshot.

  5. Open the JSON configuration of a PhantomJS source in your sandbox organization.

  6. In the JSON configuration field, set the WebDriverType parameter value to Chrome.

    "WebDriverType": {
      "sensitive": false,
      "value": "Chrome"
    }
  7. Click Save and rebuild source.

  8. When the rebuild has completed, compare the number of items and source size in the Content column of the Sources (platform-ca | platform-eu | platform-au) page with the values of the analogous source in your production organization. Item count and source size discrepancies can reveal authentication failure or improperly indexed document HTML respectively.

    Note

    Allow a couple of minutes after the rebuild has completed for the Content column values to refresh.

  9. In the Content Browser (platform-ca | platform-eu | platform-au) of your sandbox and production organizations, compare analogous items. You want to ensure that web scraping is done properly.

  10. When you feel your sandbox organization source configurations are all right, run a few UAT tests on your sandbox sources.

  11. In your sandbox organization, create a snapshot of your migrated sources and export the snapshot to your production organization.

  12. In your production organization Resource Snapshots page, open and apply the latest snapshot to update your production sources.

Potential Issues When Migrating to ChromeDriver

The following table lists use cases and potential issues when migrating from PhantomJS to ChromeDriver.

Use case Potential issue

Web source using manual form authentication.

Manual form authentication is deprecated. Use form authentication instead.

Sitemap source using manual form authentication

Manual form authentication is not supported with ChromeDriver. Use Form authentication instead.

Web source using form authentication or Sitemap source using Form authentication

Custom login sequences could be affected if the rendered HTML isn’t the same with ChromeDriver as it was with PhantomJS.

Source using web scraping

Scraping could break if the rendered HTML isn’t the same with ChromeDriver as it was with PhantomJS.

Source with no special configuration

The generated Quickview may be different. You may need to add or edit indexing pipeline extensions.

Need Help?

Log into Coveo Connect to post a question on the community or to open a support ticket.