What is "Custom Program Error 0xa7" in anchor? - anchor

My Anchor program is giving me a Transaction simulation failed: Error processing Instruction 1: custom program error: 0xa7 with nothing useful in the logs.
How do I even begin to debug this?

Custom Program Error 0xa7 is Error: 167: The given account is not owned by the executing program.
This might happen if you pass in an account that's expected to be owned by a program, but isn't.
This can happen accidentally if you forget to set declare_id!(/* ... */) to the program id you're trying to hit.
Consider logging the program id that you're using in your javascript client:
console.log(program.programId)
And then seeing if that matches the public key that's in your target/idl/yourprogram.json file.

Related

Issues with connecting Twilio Flex Digital Channels to Google Dialogflow CX

I have been following the blog post here and I've made it to testing the function on my local environment. I've copy and pasted everything form the blog into my text editor. Nothing in my code is original - but I cannot get it to work! When I try to run it in my local environment, I get this error:
const b = bindings[key].toString();
^
TypeError: Cannot read properties of undefined (reading 'toString')
at PathTemplate.render (/Users/dialogflow-cx/node_modules/google-gax/build/src/pathTemplate.js:114:37)
at SessionsClient.projectLocationAgentSessionPath (/Users/dialogflow-cx/node_modules/#google-cloud/dialogflow-cx/build/src/v3/sessions_client.js:1237:75)
at exports.handler (/Users/Waterfield/dialogflow-cx/functions/dialogflow-detect-intent.protected.js:21:25)
at process.<anonymous> (/Users/dialogflow-cx/node_modules/#twilio/runtime-handler/dist/dev-runtime/internal/functionRunner.js:74:9)
at process.emit (node:events:390:28)
at emit (node:internal/child_process:917:12)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
I don't know where to go from here! Help!
Here your TypeError is "cannot read properties of undefined", that means at least one of your passed arguments is undefined.
As we go through your return error, second line directs to the "projectLocationAgentSessionPath" and this section refers to the "Setup the detectIntentRequest" in the blog .
session: client.projectLocationAgentSessionPath(
context.DIALOGFLOW_CX_PROJECT_ID,
context.DIALOGFLOW_CX_LOCATION,
context.DIALOGFLOW_CX_AGENT_ID,
event.dialogflow_session_id
)
The above error means at least on of the objects that relates to projectId, location, agentId, SessionId is returning undefined.
To resolve the error you have to check whether you are passing correct environment variables the same as .env files or not?
Within the error, we can see that there is a reference to the code you are working on:
at exports.handler (/Users/Waterfield/dialogflow-cx/functions/dialogflow-detect-intent.protected.js:21:25)
This refers to this line:
client.projectLocationAgentSessionPath(
context.DIALOGFLOW_CX_PROJECT_ID,
context.DIALOGFLOW_CX_LOCATION,
context.DIALOGFLOW_CX_AGENT_ID,
event.dialogflow_session_id
)
Following the code through the dialogflow library and then the Google API extensions library shows that ultimately the code is running through the keys of the object that relate to the project, location, agent and session which map to the 4 arguments above. And at least one of them is returning undefined.
Have you added the correct environment variables to your .env file? Are you passing a dialogflow_session_id when you make a request to test this endpoint?

How to get more information for an error generated in libcontainer/rootfs_linux.go?

Code used from github: https://github.com/opencontainers/runc/blob/master/libcontainer/rootfs_linux.go#L59
This is the if block to debug for our interest....
if err := mountToRootfs(m, config.Rootfs, config.MountLabel, hasCgroupns); err != nil {
return newSystemErrorWithCausef(err, "mounting %q to rootfs at %q", m.Source, m.Destination)
}
Here in the if condition, there is an error generated thru newSystemErrorWithCausef function and which internally uses generic_error.go, fmt.Sprintf to format the error string.
In our integration, only once it hit this if block. And in the process of getting more details, I wanted to troubleshoot and understand why this happened.
As of now tried using fmt.Printf(........) in line 55 and also just before if block of line 59.
And also tried putting above statement in very first line of prepareRootfs function. And then tried newSystemErrorWithCause(err, "some other message") in the first line of prepareRootfs function. Overall I dont see any information generated with my messages.
Please provide any information to understand more of this issue. Please note I am not looking for why this error might have been caused. I am looking for how to get more information from that function of prepareRootfs.

Read a list from stream using Yap-Prolog

I want to run a (python3) process from my (yap) prolog script and read its output formatted as a list of integers, e.g. [1,2,3,4,5,6].
This is what I do:
process_create(path(python3),
['my_script.py', MyParam],
[stdout(pipe(Out))]),
read(Out, OutputList),
close(Out).
However, it fails at read/2 predicate with the error:
PL_unify_term: PL_int64 not supported
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe
I am sure that I can run the process correctly because with [stdout(std)] parameter given to process_create the program outputs [1,2,3,4,5,6] as expected.
Weird thing is that when I change the process to output some constant term (as constant_term) it still gives the same PL_int64 error. Appending a dot to the process' output ([1,2,3,4,5,6].) doesn't solve the error. Using read_term/3 gives the same error. read_string/3 is undefined in YAP-Prolog.
How can I solve this problem?
After asking at the yap-users mailing list I got the solution.
Re-compiled YAP Prolog 6.2.2 with libGMP option and now it works. It may also occur in 32-bit YAP.

123 ERROR_INVALID_NAME after activate Wave audio liverecorder

I am using the wave audio component in my project and I run into a problem that I am unable to resolve.
I am using Delphi XE 5 and my operating system is Windows 8. When I am trying to the run the project and active the liveaudio recorder on Windows 7, I got this: error Exception EOSError in module Chatproject.exe at 00029633. System Error. Code: 123. The filename, directory name, or volume label syntax is incorrect. But its working normal on Windows 8,. I tried to debug and figure out the problem I got this error message when I am activating the recorder
Update of the question :
i debugged each of sendtocl , sendbuffer ,buffer^, buffersize and here is result in the image ,, but i have no idea how to fix sendbuffer and buffer^ and sendtocl
http://i.stack.imgur.com/5sZ05.jpg
You have four references to sendtocl:
#56: sendtocl: TIdUDPClient;
#235: if sendtocl.active then
#236: sendtocl.SendBuffer(RawToBytes(Buffer^, Buffersize))
#260: sendtocl.Broadcast(usertype.Text, 12000);
It should be getting created when the form is created, assuming it's a component dropped on the form. But for whatever reason, it isn't instantiated at some point.
This is consistent with the exception message you're getting.
The ERROR_INVALID_NAME is probably pointing to an invalid URI, path, or filename -- it's entirely possible that it's valid in Win 8 but not Win 7. So when you try to invoke .Active, it fails. But why sendtocl woudl be set to NIL doesn't make sense. Mabye the exception is on the SendBuffer method?
As Ken suggests, you just need to go in with the debugger and figure out what's going on. I'm not sure there's much more us "out here" can do for you other than comment on how the code appears.

Ranap ErrorIndication

I am new to telecom domain
I am trying to encode and decode the ranap errorIndication message.
but the specification specifies that
Procedure Code is to be used
if Criticality Diagnostics is part
of Error Indication procedure,
and not within the response
message of the same
procedure that caused the
error.
So if I include the procedure code of the failing message in the errorIndication message.Then the wireshark shows the errorIndication as the SACK of the failed message.
So I want to know how we can include the procedure code of the failing message in the errorIndication so that Wireshark should treat the message correctly.
Thanks in Advance.
A quick look at 3GPP TS 25.413 (RANAP signalling) shows that Criticality Diagnostics (9.2.1.35) is part of the Error Indication message (9.1.41).
In section 8.27, the spec says
The Error Indication procedure is initiated by a node to report detected errors in one incoming message, provided they cannot be reported by an appropriate failure message.
The definition for Procedure Code that you quoted in the question, makes it clear that the Procedure Code refers to a message that is NOT being replied to with the Error Indication.
In the Error Indication (section 9.1.41), there is also no code that refers to the message that caused the Error Indication.
The Error Indication information elements are
Message Type
Cause
Criticality Diagnostics (includes the Procedure Code that is causing the error)
CN Domain indicator
Global RNC ID
Global CN ID
Extended RNC ID
So, my conclusion, based on your description, is that I think Wireshark may have interpreted the spec wrongly. Wireshark seems to be looking for a message to which the Error Indicator is a reply.
But the Procedure Code is only supposed to tell you which message caused the error and should be re-sent. It's not supposed to tell you that the Error Indicator is a reply to that particular message.
Apologies if I am slandering Wireshark - if anyone comes up with an answer that proves me wrong, I will happily delete this post. Maybe you should ask this question on the Wireshark forum. I couldn't see anything like the issue you describe among the questions there.

Resources