Skip to content

Commit edc4a48

Browse files
[codex] Fix Firebase version symbol lookups (#173)
* Fix Firebase version symbol lookups * Remove Firebase E2E workflow from symbol fix PR
1 parent ec616a5 commit edc4a48

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

docs/firebase-runtime-failure-backlog.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ This backlog tracks binding drifts that are concrete candidates for the runtime-
44

55
## Ready
66

7-
| Case id | Target/member | Audit finding reference | Expected runtime failure mechanism | Proof status | Fix PR | Merged commit |
8-
| --- | --- | --- | --- | --- | --- | --- |
9-
| `abtesting-validaterunningexperiments` | `Firebase.ABTesting.ExperimentController.ValidateRunningExperiments` | `output/firebase-binding-audit/report.json` -> `ABTesting` -> `ValidateRunningExperiments` (`signature-drift`) | The old binding exports `validateRunningExperimentsForServiceOrigin:runningExperimentPayloads:` as `NSObject[]` instead of `ABTExperimentPayload[]`, so callers can send arbitrary objects and native ABTesting immediately raises `ObjCRuntime.ObjCException` when it invokes `ABTExperimentPayload` selectors on those objects. | Proved locally on the unfixed binding. Evidence artifact: `tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-result-abtesting-validaterunningexperiments-failure.json`. Regression artifact: `tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-result-abtesting-validaterunningexperiments-success.json`. | - | - |
7+
No runtime-failure candidates are currently promoted.
108

119
## Investigating
1210

@@ -17,5 +15,6 @@ No additional runtime-failure candidates are currently promoted.
1715
| Case id | Target/member | Audit finding reference | Runtime failure mechanism | Proof status | Fix PR | Merged commit |
1816
| --- | --- | --- | --- | --- | --- | --- |
1917
| `abtesting-activateexperiment` | `Firebase.ABTesting.ExperimentController.ActivateExperiment` | `output/firebase-binding-audit/report.json` -> `ABTesting` -> `ActivateExperiment` (`signature-drift`) | The old binding exported `activateExperiment:forServiceOrigin:` as `NSObject` instead of `ABTExperimentPayload`, so callers could send an arbitrary object and native ABTesting immediately raised `ObjCRuntime.ObjCException` when it invoked `ABTExperimentPayload` selectors on that object. | Proved and fixed. Evidence artifact: `tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-result-abtesting-activateexperiment-failure.json`. Regression artifact: `tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-result-abtesting-activateexperiment-success.json`. | [#114](https://github.com/AdamEssenmacher/GoogleApisForiOSComponents/pull/114) | `f77b1c57eff15cf6c1b5ca0df47d8195b46f0f40` |
18+
| `abtesting-validaterunningexperiments` | `Firebase.ABTesting.ExperimentController.ValidateRunningExperiments` | `output/firebase-binding-audit/report.json` -> `ABTesting` -> `ValidateRunningExperiments` (`signature-drift`) | The old binding exported `validateRunningExperimentsForServiceOrigin:runningExperimentPayloads:` as `NSObject[]` instead of `ABTExperimentPayload[]`, so callers could send arbitrary objects and native ABTesting immediately raised `ObjCRuntime.ObjCException` when it invoked `ABTExperimentPayload` selectors on those objects. | Proved and fixed. Evidence artifact: `tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-result-abtesting-validaterunningexperiments-failure.json`. Regression artifact: `tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-result-abtesting-validaterunningexperiments-success.json`. | [#115](https://github.com/AdamEssenmacher/GoogleApisForiOSComponents/pull/115) | `6973085307d474247b19639ef7fde074a3eece9f` |
2019
| `cloudfunctions-usefunctionsemulatororigin` | `Firebase.CloudFunctions.CloudFunctions.UseFunctionsEmulatorOrigin` | Manual runtime candidate from the current binding surface and native `FirebaseFunctions` Swift header | The binding exported `useFunctionsEmulatorOrigin:` even though the current framework only exposes `useEmulatorWithHost:port:`. Calling the stale selector raised `ObjCRuntime.ObjCException` with an unrecognized-selector native exception. | Proved and fixed. Evidence artifact: `tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-result-cloudfunctions-usefunctionsemulatororigin-failure.json`. Regression artifact: `tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-result-cloudfunctions-usefunctionsemulatororigin-success.json`. | [#113](https://github.com/AdamEssenmacher/GoogleApisForiOSComponents/pull/113) | `b6a6c82c74e0cf3645edb9dc5519d4a628f7ed36` |
2120
| `cloudfirestore-getquerynamed` | `Firebase.CloudFirestore.Firestore.GetQueryNamed` | `output/firebase-binding-audit/report.json` -> `CloudFirestore` -> `GetQueryNamed` (`signature-drift`) | The old binding exported `getQueryNamed:completion:` as `NSInputStream` instead of `NSString`, so native Firestore received `__NSCFInputStream` and threw an Objective-C exception when it treated the argument like a string. | Proved and fixed. Evidence artifact: `tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-result-cloudfirestore-getquerynamed-failure.json`. Regression artifact: `tests/E2E/Firebase.Foundation/artifacts/firebase-foundation-result-cloudfirestore-getquerynamed-success.json`. | [#112](https://github.com/AdamEssenmacher/GoogleApisForiOSComponents/pull/112) | `3077a538a892de0db3350f0a459bf8620729f4db` |

source/Firebase/Auth/Extension.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ public static string CurrentVersion {
1313
throw new InvalidOperationException ("Unable to open the main program handle.");
1414

1515
try {
16-
IntPtr ptr = Dlfcn.dlsym (RTLD_MAIN_ONLY, "FirebaseAuthVersionStr");
16+
IntPtr ptr = Dlfcn.dlsym (RTLD_MAIN_ONLY, "FirebaseAuthVersionString");
1717
if (ptr == IntPtr.Zero)
18-
throw new InvalidOperationException ("Unable to resolve FirebaseAuthVersionStr.");
18+
throw new InvalidOperationException ("Unable to resolve FirebaseAuthVersionString.");
1919

2020
currentVersion = Marshal.PtrToStringAnsi (ptr)
21-
?? throw new InvalidOperationException ("Unable to read FirebaseAuthVersionStr.");
21+
?? throw new InvalidOperationException ("Unable to read FirebaseAuthVersionString.");
2222
} finally {
2323
Dlfcn.dlclose (RTLD_MAIN_ONLY);
2424
}

source/Firebase/CloudFunctions/Extension.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ public static string CurrentVersion {
1212
throw new InvalidOperationException ("Unable to open the main program handle.");
1313

1414
try {
15-
IntPtr ptr = Dlfcn.dlsym (RTLD_MAIN_ONLY, "FirebaseCloudFunctionsVersionStr");
15+
IntPtr ptr = Dlfcn.dlsym (RTLD_MAIN_ONLY, "FirebaseFunctionsVersionString");
1616
if (ptr == IntPtr.Zero)
17-
throw new InvalidOperationException ("Unable to resolve FirebaseCloudFunctionsVersionStr.");
17+
throw new InvalidOperationException ("Unable to resolve FirebaseFunctionsVersionString.");
1818

1919
currentVersion = Marshal.PtrToStringAnsi (ptr)
20-
?? throw new InvalidOperationException ("Unable to read FirebaseCloudFunctionsVersionStr.");
20+
?? throw new InvalidOperationException ("Unable to read FirebaseFunctionsVersionString.");
2121
} finally {
2222
Dlfcn.dlclose (RTLD_MAIN_ONLY);
2323
}

0 commit comments

Comments
 (0)