How to restore deleted user - getstream-io

I deleted the user. Code below
return $this->getStream->delete('5');
And now each connection with this user id returned error
"{\"code\":16,\"message\":\"UpdateUsers failed with error: \\\"user 5 was deleted\\\"\",\"StatusCode\":404,\"duration\":\"0.00ms\"}"
How to restore this deleted user

Once deleted, it is not possible to restore a user ID on Stream

Related

Excel error 'The Operation was cancelled by the user'

I have an Excel file which is connected to the database. Whenever, I try to refresh the data I get the error as
"We couldn't refresh multiple tables, including from connection 'SqlServer. Here's the message we got:
The Operation was cancelled by user"
Why I am getting this error? The data connections seem fine.

The remote server returned an error: (404) Not Found While deleting message from queue

We are using Azure Queue for our printing job but when deleting message from queue by queue.DeleteMessage(message), the method throws below exception.
The remote server returned an error: (404) Not Found
Above exception was handled but still looking for workaround.
Can anyone please suggest how to fix it.
Thanks,
Sneh
According to this article, we can find that:
After a client retrieves a message with the Get Messages operation,
the client is expected to process and delete the message. To delete
the message, you must have two items of data returned in the response
body of the Get Messages operation:
The message ID, an opaque GUID value that identifies the message in the queue.
A valid pop receipt, an opaque value that indicates that the message has been retrieved.
If a message with a matching pop receipt is not found, the service returns error code 404 (Not Found). And Pop receipts remain valid until one of the following events occurs:
The message has expired.
The message has been deleted using the last pop receipt received
either from Get Messages or Update Message.
The invisibility timeout has elapsed and the message has been
dequeued by a Get Messages request. When the invisibility timeout
elapses, the message becomes visible again. If it is retrieved by
another Get Messages request, the returned pop receipt can be used
to delete or update the message.
The message has been updated with a new visibility timeout. When the
message is updated, a new pop receipt will be returned.
I ran into this issue today and the root cause was ownership issues between two different queues. We had setup two queues, one to hold our message awaiting processing and one for messages that had errored out. The problem came with the logic of how the message was moved between queues.
If our processing failed, we would perform the following logic:
_errorQueue.AddMessage(msg);
_queue.DeleteMessage(msg);
The DeleteMessage would also return a (404) Not Found because the msg had been moved to the errorQueue. There were two solutions that I found to this issue:
1. Switch Logic
If you switch the logic than the msg will be deleted before being added to the errorQueue which will avoid the ownership swap.
_queue.DeleteMessage(msg);
_errorQueue.AddMessage(msg);
2. Insert Copy of Message
Solution #1 has the potential to lose the message if something happens between deletion and insertion (small chance but a chance nonetheless). The solution I went with inserted a copy of the msg with the same payload so it didn't run into this ownership issue because it was a different object.
_errorQueue.AddMessage(new CloudQueueMessage(msg.AsString));
_queue.DeleteMessage(msg);
Debugging Tip
One useful tip I encountered while debugging it making sure the exception your catching isn't the default Exception. Catch the StorageException instead to get access to Azure Storage related error information.
try
{
_queue.DeleteMessage(msg);
}
catch (StorageException ex) //use this instead of base Exception
{
var info = ex.RequestInformation; //has useful information
}
If can provide more information to help you debug your real issue.

Create table with different linux user in Hive is giving exception

I have existing Hadoop setup with Hive, a new user on Linux node is unable to create the table giving below exception:
(message:Got exception: org.apache.hadoop.security.AccessControlException Permission denied: user=
access=WRITE, inode="/bigdata/hivetmp/user/hive/warehouse/gpeh.db":hadoop1:supergroup:drwxr-xr-x
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkFsPermission(FSPermissionChecker.java:271)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:257)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:238)
However, with same user I am able to create the database.
I have provided necessary access to the user on required folders.
Its just a permission issue.
If you see at the HDFS level
inode="/bigdata/hivetmp/user/hive/warehouse/gpeh.db" :hadoop1:supergroup:drwxr-xr-x at
That means the new user doesnt have write permission at the database.
You can just change it to give the new user write permission and try again.

CoreData app not syncing with iCloud

I am running an iPad app on iOS7, XCode 6; I have the device iCloud enabled for Documents and the app enabled for iCloud. Nothing shows up in iCLoud when I run my app on the device and make changes to the Core Data store in the app (using MagicalRecord).
Is there something else I need to do? (I want to have device sharing and backup capabilities of the Core Data store using MagicalRecord)
UPDATE:
Made these changes:
(I was unable to check "JRSD9A598D" for a container)
and:
and this is line of code giving me a run-time error:
[MagicalRecord setupCoreDataStackWithiCloudContainer:#"rolfbucket" localStoreNamed:#"saori.sqlite"];
This is the error:
2014-11-05 07:53:15.156 SalonBook[223:1607] *** -[NSFileManager URLForUbiquityContainerIdentifier:]: An error occurred while getting ubiquity container URL: Error Domain=LibrarianErrorDomain Code=11 "The operation couldn’t be completed. (LibrarianErrorDomain error 11 - The requested container identifier is not permitted by the client's com.apple.developer.ubiquity-container-identifiers entitlement.)" UserInfo=0x1456bb50 {NSDescription=The requested container identifier is not permitted by the client's com.apple.developer.ubiquity-container-identifiers entitlement.}
I appear to be making progress, but what is causing this error?
The problem was I had picked the wrong container; it should have been the one with my bundle ID. Fixed that and the error went away.

How to handle file_get_contents failed error message?

I am running a request to the youtube data api.
The user inputs there account name, saves the settings and then checks the page for what videos are on there account -
If they enter their account name wrong, or the account name doesn't exist I want it to display an error message clarifying that they have entered an incorrect account name.
If it is successful it should just print the videos in a list.
I have it printing videos/pulling videos from youtube if the account name is correct. If it is wrong, I get a File_Get_Contents failed -
Warning: file_get_contents(http://gdata.youtube.com/feeds/api/users/ddd/uploads?
v=2&alt=json): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found
in C:\xampp\htdocs\site\wp-content\plugins\plugin\includes\get_vid_list.php on
line 379
I would like, instead of printing the error I want it to print an error message to the user:
How do I check if file_get_contents() was successful or not?
Use PHP's # modifier to suppress automatic error reporting:
$contents = #file_get_contents($url);
if (!$contents) {
// Report error
}

Resources