Breaking API changes in Kameleo 2.11.0

  • Created

If you are using the Kameleo Local API you may need to adjust your code once you update to Kameleo v2.11

Usually, when you update Kameleo you also need to update the Local API Client version as well (please see the compatibility table). This time we made a more significant update between the Local API version v2.10 and v2.11

In Kameleo v2.11 we separated WebGL and WebGL MetaData spoofing options. So from now, you should be able to set up WebGL MetaData options even if you turn off the WebGL spoofing. To clarify:

  • WebGL spoofing is responsible for changing the way how canvas 3D elements are drawn
  • WebGL Meta spoofing is changing the driver information of the WebGL context (metadata about the GPU)

This change affects the CreateProfileRequest and the ProfileResponse objects.

Kameleo-Breaking-Change-v2-11-webgl-meta.png

Most likely this change will cause an issue for you if you explicitly set the WebGL spoofing during the profile creation.

Change the following code

  • const createProfileRequest = BuilderForCreateProfile
      .forBaseProfile(chromeBaseProfileList[0].id)
      .setRecommendedDefaults()
      .setWebgl(
        'noise',
        { vendor: 'Google Inc.', renderer: 'ANGLE (Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0)' },
      )
      .build();
    const profile = await client.createProfile({ body: createProfileRequest });
  • var createProfileRequest = BuilderForCreateProfile
      .ForBaseProfile(baseProfileList[0].Id)
      .SetRecommendedDefaults()
      .SetWebgl("noise", new WebglSpoofingOptions("Google Inc.", "ANGLE (Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0)"))
      .Build();
    var profile = await client.CreateProfileAsync(createProfileRequest);
  • create_profile_request = BuilderForCreateProfile \
      .for_base_profile(base_profiles[0].id) \
      .set_recommended_defaults() \
      .set_webgl("noise", WebglSpoofingOptions(vendor='Google Inc.', renderer='ANGLE (Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0)')) \
      .build()
    profile = client.create_profile(body=create_profile_request)

To this code

  • const createProfileRequest = BuilderForCreateProfile
      .forBaseProfile(chromeBaseProfileList[0].id)
      .setRecommendedDefaults()
      .setWebgl('noise')
      .setWebglMeta(
        'manual',
        { vendor: 'Google Inc.', renderer: 'ANGLE (Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0)' },
      )
      .build();
    const profile = await client.createProfile({ body: createProfileRequest });
  • var createProfileRequest = BuilderForCreateProfile
      .ForBaseProfile(baseProfileList[0].Id)
      .SetRecommendedDefaults()
      .SetWebgl("noise")
      .SetWebglMeta("manual",new WebglMetaSpoofingOptions("Google Inc.", "ANGLE (Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0)"))
      .Build();
    var profile = await client.CreateProfileAsync(createProfileRequest);
  • create_profile_request = BuilderForCreateProfile \
      .for_base_profile(base_profiles[0].id) \
      .set_recommended_defaults() \
      .set_webgl("noise") \
      .set_webgl_meta("manual", WebglMetaSpoofingOptions(vendor='Google Inc.', renderer='ANGLE (Intel(R) HD Graphics 630 Direct3D11 vs_5_0 ps_5_0)')) \
      .build()
    profile = client.create_profile(body=create_profile_request)

If you face any issues with this, please contact our support team, or raise an issue on GitHub.

Was this article helpful?

0 out of 0 found this helpful