Opened 6 months ago

Last modified 6 months ago

#6734 new defect

The latest Safari development build doesn't work

Reported by: kzar Assignee:
Priority: P2 Milestone:
Module: Unknown Keywords:
Cc: sebastian, philll, Ross, fhd, tlucas, mapx, dzhang Blocked By:
Blocking: Platform: Safari
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by kzar)

Environment

macOS High Sierra, Safari 11.1

How to reproduce

  1. Download the latest development build.
  2. Attempt to install it.

Observed behaviour

An error message is displayed Safari can't install this extension - An error occurred whileinstalling the extension "Adblock Plus".

Expected behaviour

No error is displayed, the extension installs.

Notes

  • This seems to be only a problem with the latest development build Adblock Plus for Safari 1.12.4.2015, the previous one installs OK.
  • It seems our certificate is not valid after "Sep 21 10:08:30 2017 GMT" which is the cause of the problem.

Change History (15)

comment:1 Changed 6 months ago by kzar

Still not sure what's going on, I extracted the archives and can't see much different:

diff --git a/Info.plist b/Info.plist
index cae5553..6f58e10 100644
--- a/Info.plist
+++ b/Info.plist
@@ -9,9 +9,9 @@
   <key>CFBundleInfoDictionaryVersion</key>
   <string>6.0</string>
   <key>CFBundleShortVersionString</key>
-  <string>1.12.4.1825</string>
+  <string>1.12.4.2015</string>
   <key>CFBundleVersion</key>
-  <string>1.12.4.1825</string>
+  <string>1.12.4.2015</string>
   <key>DeveloperIdentifier</key>
   <string>GRYYZR985A</string>
   <key>Chrome</key>
diff --git a/lib/info.js b/lib/info.js
index 441e668..fb869d3 100644
--- a/lib/info.js
+++ b/lib/info.js
@@ -4,7 +4,7 @@
 
 require.scopes.info = {
   addonName: "adblockplussafari",
-  addonVersion: "1.12.4.1825",
+  addonVersion: "1.12.4.2015",
 
   application: 'safari',
   get applicationVersion() {

comment:2 Changed 6 months ago by kzar

Could this be an expired certificate again?

comment:3 Changed 6 months ago by kzar

Tristan perhaps I'm misunderstanding but I think there might be a bug with...

Sorry my comment about the build.py logic was wrong, since I was missing the first item and I got the old order confused with the new one. This seems to work OK:

args = ["build.py", "build", "-t", "safari"]
index_opt = args.index("-t")
index_val = index_opt + 1
args.insert(1, args.pop(index_opt))
args.insert(2, args.pop(index_val))

print args => ['build.py', '-t', 'safari', 'build']
Last edited 6 months ago by kzar (previous) (diff)

comment:4 follow-ups: Changed 6 months ago by kzar

  • Description modified (diff)

So I compiled the xar command, extracted the certificates and can confirm that seems to be the problem. Our certificate is only valid between "Sep 21 10:08:30 2016 GMT" and "Sep 21 10:08:30 2017 GMT".

I'm not sure how to generate a new certificate or update the build, any idea Sebastian?

comment:5 in reply to: ↑ 4 Changed 6 months ago by tlucas

Replying to kzar:

Tristan perhaps I'm misunderstanding but I think there might be a bug with...

Sorry my comment about the build.py logic was wrong, since I was missing the first item and I got the old order confused with the new one. This seems to work OK:

args = ["build.py", "build", "-t", "safari"]
index_opt = args.index("-t")
index_val = index_opt + 1
args.insert(1, args.pop(index_opt))
args.insert(2, args.pop(index_val))

print args => ['build.py', '-t', 'safari', 'build']

Glad you could sort things out :)
The lines you posted here are a workaround, in order to a) be able to build anything with the new order and b) to not have to update the buildtools dependency in the safari-branch.

Replying to kzar:

So I compiled the xar command, extracted the certificates and can confirm that seems to be the problem. Our certificate is only valid between "Sep 21 10:08:30 2016 GMT" and "Sep 21 10:08:30 2017 GMT".

I'm not sure how to generate a new certificate or update the build, any idea Sebastian?

I guess we have to ping #ops to generate a new certificate on abp-builds-1.

comment:6 Changed 6 months ago by tlucas

Or, as per sebastian's suggestion in #adblockplus, drop safari support completely.

4:27 PM <snoack> rossg_: For the time being can you download and install the latest development > builds from https://downloads.adblockplus.org/devbuilds/adblockpluschrome/?
4:30 PM fhd, kzar, philll: IMO, this is a good opportunity to finally discontinue Adblock Plus
for Safari. If we have a native macOS app / App Extension ready to refer users to, great but if
not I'm not sure if further modifications to the traditional extension are worth it.

comment:7 in reply to: ↑ 4 ; follow-up: Changed 6 months ago by sebastian

Replying to kzar:

I'm not sure how to generate a new certificate or update the build, any idea Sebastian?

Please refer to the README. As documented there, the certificate needs to be retrieved from the Apple Developer Center. However, when I try to do so I get following error message:

The selected team's agent, Felix Dahlke must agree to the latest Program License Agreement in their developer account. https://developer.apple.com/account/

Furthermore, according to the Safari 12 announcement, developer-signed extensions will no longer be supported anyway. So even if we renew the certificate, the devbuilds won't load in Safari 12 (and above).

comment:9 Changed 6 months ago by mapx

  • Cc mapx added

comment:10 in reply to: ↑ 7 Changed 6 months ago by fhd

Replying to sebastian:

Replying to kzar:

I'm not sure how to generate a new certificate or update the build, any idea Sebastian?

Please refer to the README. As documented there, the certificate needs to be retrieved from the Apple Developer Center. However, when I try to do so I get following error message:

The selected team's agent, Felix Dahlke must agree to the latest Program License Agreement in their developer account. https://developer.apple.com/account/

Done, I suppose it should work now.

Furthermore, according to the Safari 12 announcement, developer-signed extensions will no longer be supported anyway. So even if we renew the certificate, the devbuilds won't load in Safari 12 (and above).

Meaning we would have to deliver both release and devbuild through the App Store?

comment:11 Changed 6 months ago by dzhang

  • Cc dzhang added

comment:12 Changed 6 months ago by dzhang

I duplicated this issue in #6747.

The Safari extension can be re-signed using the following procedure by someone with code signing authority for our Apple developer accounts. This is to support users of Safari <v12.

  1. Request a Safari extension certificate at developer.apple.com.
  2. Install the certificate.
  3. Download the existing extension.
  4. Extract it with xar -f "${FILENAME}.safariextz" -x
  5. Open Safari > Develop > Show Extension Builder
  6. Add the extracted folder.
  7. Build package.
Last edited 6 months ago by dzhang (previous) (diff)

comment:13 Changed 6 months ago by sebastian

I know. However, we should rather just put the new key on the server, and have automatically generated builds again (for Safari <12).

As for Safari 12 and above, there are other compatibility issues anyway, which we don't seem to plan to address, but rather have the traditional Safari extension being replaced with a native App Extension (port of Adblock Plus for iOS), soon.

comment:14 Changed 6 months ago by dzhang

@sebastian Putting the key on the server is better, I agree.

The native App Extension work is underway.

Last edited 6 months ago by dzhang (previous) (diff)
Note: See TracTickets for help on using tickets.