Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windowName is null #1131

Open
leonardosalatino opened this issue Aug 13, 2020 · 2 comments
Open

windowName is null #1131

leonardosalatino opened this issue Aug 13, 2020 · 2 comments
Labels
bug requires discussion This issues needs to be reviewed before development can start

Comments

@leonardosalatino
Copy link

Describe the bug
I get windowName in null after appBridge.register(). I also have the tab text with "Loading..."

To Reproduce
Steps to reproduce the behavior:

  1. I'm trying to create a new menu item. Already registered it, I can access to it and I am able to see my local page inside the bullhorn app
  2. The tab title for my menu item is with the text "Loading..." and it never changes
  3. The page is showing "This app can only be run inside of Bullhorn as a Custom Menu Item" error because the windowName, after the bridge registation, is in null.
  4. I'm working with this code: https://github.com/bullhorn/extension-samples/tree/master/05.HelloMenuItem
    Here I'm at /app/services/appBridge.services.ts, method "register(): void".
  5. The line "this.bridge.register(this.appBridgeConfig).then((windowName: string) => {" is returning windowName in null. Because of that then the page is not shown because the following validation is not passed:
this.registered = !this.requiresWindowObject || windowName != null;
if (this.registered) {
	this.onRegistered.emit(true);
} else {
	this.registerRetry();
}

But if I just add a "this.registered = true" to run the emit(), the validation is baypassed and the page successfully loaded. I just would like to correctly fix it because I think this error is causing the tab label to keep with the text "Loading..."

Expected behavior

  • The windowName should not come in null, but this is returned by the bridge.register, so I'm not sure why it is null.
  • The tab text should be the title

Actual behavior
bridge.register is returning windowName in null, in the then clause of the promise

Specifications

Screenshots
loading tab title

@ericflores108
Copy link

Hi @leonardosalatino - I am having a similar issue. Once I implemented your fix, it is giving me this error:

register - FAILED - (no parent)" Error: No handler found for post message: register from https://local.bullhornstaffing.com:4201 in https://cls43.bullhornstaffing.com/BullhornStaffing/CustomAction.cfm

Did you encounter a similar issue? Thanks in advance.

@michael-amaya-bh michael-amaya-bh added bug requires discussion This issues needs to be reviewed before development can start labels Feb 26, 2024
@platypusjones
Copy link

platypusjones commented Apr 2, 2024

Also encountering the same issue. I notice two problems when registering:

  1. windowName always returns null. This is true even if a windowName property is present in environment.appBridgeConfig. From the relevant code it looks like this should be definable.
  2. _registeredFrames is always empty. Since the array is empty, the expected close() behavior isn't effective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug requires discussion This issues needs to be reviewed before development can start
Projects
None yet
Development

No branches or pull requests

4 participants