Open Browser: Object reference not set to an instance of an object

This is what I have…

What does it need?

@anacarolinasoeiro, Can you please zip your folder and share it?

DEV_TEST_PROC1.7z (958.9 KB)

Your workflow does not nullify the Config file. I think you’re running the file by itself, which cannot be done without the Config file being defined.

When you run your project in Studio 2019, make sure you’re using Debug and not Execute the File. Alternatively, you can run the project by pressing F5, or to run it without Debug messages (I do not recommend this), use Ctrl + F5.

If you’re running Studio 2018, use F6 and not F5.

2 Likes

Agree with @Anthony_Humphries, I check your workflows and everything looks good to me. It is populating values as expected.

So what can I do?

Hi @anacarolinasoeiro,

Can you please run/Debug from the Main.xaml file, as the value for Config gets populated by InitAllSettings at the Init phase. You are directly trying to run the Process.xaml file without having any values assigned to the Config dictionary.

Regards,
PD

1 Like

Stilll doesn’t work :confused:

Hi @anacarolinasoeiro,

Here are a couple of suggestions for you:

  • You have a message box within the process.xaml printing the Config itself, without any key. This will only print the datatype of the dictionary. If you wish, you may want to specify some key in there.

  • I’m assuming you’re just learning how the Framework is working with this exercise and that’s why you have opening a browser in the Process workflow. You can have it in the Init phase within the InitAllApps worklfow as well. I would recommend you to go through the Level 3 - Advanced training on Academy if you haven’t had the chance already. This training consists of practical exercises using the REFramework :ok_hand:

  • Again make sure you’re executing the automation from the Main.xaml file tab. As @Anthony_Humphries suggested please run at the Project level and not at the current file level. On the latest versions use Ctrl+F5(Run) or F5 (Debug) (I downloaded you’re code and ran it and it works fine)

Please let us know by providing more descriptions on which activity it’s failing or send us screenshots.

Regards,
PD

1 Like

Hello @PD2

Yeah, I’ve been working on it and I’ve made the open browser in the Init state now. But still it gives me the same error.

Frustating… :confounded:

Hi @anacarolinasoeiro,

Can you troubleshoot by placing log messages at every step after Invoking InitAllSettings and add breakpoints, not sure what you’re missing. I want you to check every single step and follow-through, debugging will help find the issue.

Regards,
PD

Hello @PD2

I think this is what you want :confounded:

When I dedug from main:
03/12/2020 09:52:00 => [Debug] Debug started for file: Main_test
03/12/2020 09:52:02 => [Info] DEV_PROC1 execution started
03/12/2020 09:52:04 => [Debug] Main_test Executing
03/12/2020 09:52:04 => [Debug] General Business Process Executing
03/12/2020 09:52:04 => [Debug] Initialization Executing
03/12/2020 09:52:04 => [Debug] Try initializing settings and applications Executing
03/12/2020 09:52:04 => [Debug] Load configurations and open applications Executing
03/12/2020 09:52:04 => [Debug] Assign boolStartProcess Executing
03/12/2020 09:52:04 => [Debug] Assign boolStartProcess Closed
03/12/2020 09:52:04 => [Debug] Assign SystemException (initialization) Executing
03/12/2020 09:52:04 => [Debug] Assign SystemException (initialization) Closed
03/12/2020 09:52:04 => [Debug] If first run, read local configuration file Executing
03/12/2020 09:52:04 => [Debug] First run Executing
03/12/2020 09:52:04 => [Debug] Invoke InitAllSettings workflow Executing
03/12/2020 09:52:04 => [Debug] InitAllSettings Executing
03/12/2020 09:52:04 => [Debug] Initialize All Settings Executing
03/12/2020 09:52:04 => [Debug] Assign out_Config (initialization) Executing
03/12/2020 09:52:04 => [Debug] Assign out_Config (initialization) Closed
03/12/2020 09:52:04 => [Debug] For each configuration sheet Executing
03/12/2020 09:52:04 => [Debug] Get local settings and constants Executing
03/12/2020 09:52:05 => [Debug] Read range (Settings and Constants sheets) Executing
03/12/2020 09:52:05 => [Debug] Read range (Settings and Constants sheets) Closed
03/12/2020 09:52:05 => [Debug] For each configuration row Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] For each configuration row Closed
03/12/2020 09:52:05 => [Debug] Get local settings and constants Closed
03/12/2020 09:52:05 => [Debug] Get local settings and constants Executing
03/12/2020 09:52:05 => [Debug] Read range (Settings and Constants sheets) Executing
03/12/2020 09:52:05 => [Debug] Read range (Settings and Constants sheets) Closed
03/12/2020 09:52:05 => [Debug] For each configuration row Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Executing
03/12/2020 09:52:05 => [Debug] Sequence Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Executing
03/12/2020 09:52:05 => [Debug] Add Config key/value pair Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] If configuration row is not empty Closed
03/12/2020 09:52:05 => [Debug] Sequence Closed
03/12/2020 09:52:05 => [Debug] For each configuration row Closed
03/12/2020 09:52:05 => [Debug] Get local settings and constants Closed
03/12/2020 09:52:05 => [Debug] For each configuration sheet Closed
03/12/2020 09:52:05 => [Debug] Comment Out Closed
03/12/2020 09:52:05 => [Debug] Comment Out Executing
03/12/2020 09:52:05 => [Debug] Initialize All Settings Closed
03/12/2020 09:52:05 => [Debug] InitAllSettings Closed
03/12/2020 09:52:05 => [Debug] Invoke InitAllSettings workflow Closed
03/12/2020 09:52:05 => [Debug] Comment Out Executing
03/12/2020 09:52:05 => [Debug] Comment Out Closed
03/12/2020 09:52:06 => [Debug] Invoke KillAllProcesses workflow (first run) Executing
03/12/2020 09:52:06 => [Debug] KillAllProcesses Executing
03/12/2020 09:52:06 => [Debug] Kill All Processes Executing
03/12/2020 09:52:06 => [Debug] Comment Out Executing
03/12/2020 09:52:06 => [Debug] Comment Out Closed
03/12/2020 09:52:06 => [Debug] Killing processes…
03/12/2020 09:52:06 => [Debug] Log message (Kill processes) Executing
03/12/2020 09:52:06 => [Debug] Log message (Kill processes) Closed
03/12/2020 09:52:06 => [Debug] Kill All Processes Closed
03/12/2020 09:52:06 => [Debug] KillAllProcesses Closed
03/12/2020 09:52:06 => [Debug] Invoke KillAllProcesses workflow (first run) Closed
03/12/2020 09:52:06 => [Debug] Comment Out Executing
03/12/2020 09:52:06 => [Debug] Comment Out Closed
03/12/2020 09:52:06 => [Debug] First run Closed
03/12/2020 09:52:06 => [Debug] If first run, read local configuration file Closed
03/12/2020 09:52:06 => [Debug] Invoke InitiAllApplications workflow Executing
03/12/2020 09:52:06 => [Debug] InitAllApplications Executing
03/12/2020 09:52:06 => [Debug] Initialize All Applications Executing
03/12/2020 09:52:06 => [Debug] Opening applications…
03/12/2020 09:52:06 => [Debug] Log message (Initialize applications) Executing
03/12/2020 09:52:06 => [Debug] Log message (Initialize applications) Closed
03/12/2020 09:52:06 => [Debug] Abrir Browser + Tab SAP Faulted
03/12/2020 09:52:06 => [Error] Abrir Browser + Tab SAP: Object reference not set to an instance of an object.

GUYS I WORKED IT OUT

THANK YOU SO MUCH

I was not passing the config value :stuck_out_tongue: and I just understood what you were saying all along :slight_smile:

1 Like

InitAllSettings is a built in workflow from the REFramework, it works fine and renders the config dictionary as output. Please place the log messages After the Invoke InitAllSettings.

Also, I recommend you to go through the courses on Academy. Trust me it will help you a long way.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.