I keep getting this warning:
Instance Method'-fetcherWithRequest:fetcherClass:' not found (return type defaults to 'id')
Here is the code that gives me the warning:
+ (GTMHTTPUploadFetcher *)uploadFetcherWithRequest:(NSURLRequest *)request
fetcherService:(GTMHTTPFetcherService *)fetcherService {
// Internal utility method for instantiating fetchers
GTMHTTPUploadFetcher *fetcher;
if (fetcherService) {
fetcher = [fetcherService fetcherWithRequest:request
fetcherClass:self];
} else {
fetcher = (GTMHTTPUploadFetcher *) [self fetcherWithRequest:request];
}
return fetcher;
}
this is in the GTMHTTPUploadFetcher.m file copyright 2010 version 2.0 mac toolbox
I have looked in the GTMHTTPUploadFetcher.h file for the fetcherClass but didn't find anything.
Has anyone else had this problem and how did you solve it?
Everything works ok and I can upload videos to Youtube I would just like to get rid of this warning.
found the correct method in another .h file found on line. Now everything works fine and I don't get a warning.
Related
I used react P5.sound for creating the music player. And I wrote the code at the preload function.
import mysong from "./localsongs/mysong.mp3";
preload() {
p5.loadSound(mysong);
}
This code really works fine on the local and plays the music.
But when I hosted on the server and deploy the website, I got the error that I've mentioned in the title.
I tried the loadSound function for loadsound like
preload() {
p5.loadSound(url("./localsongs/mysong.mp3));
}
But in this case, the error
url is not defined
is got in my react console.
Maybe you meant something like:
let mysong;
preload() {
mysong = loadSound("./localsongs/mysong.mp3");
}
For more info see loadSound().
You might need to serve the mp3 file on a local webserver
I am following the CakePHP 4.x tutorial to the letter (as far as I can see) until chapter "CMS Tutorial - Authentication".
Half way through "Now, on every request, the AuthenticationMiddleware will inspect the request session to look for an authenticated user. If we are loading the /users/login page, it will also inspect the posted form data (if any) to extract the credentials."
When I try to access articles or users I get an error:
( ! ) Fatal error: Interface
'Authentication\AuthenticationServiceProviderInterface' not found in
C:\wamp64\www\cake\src\Application.php on line 41
I have tried to figure out why this would be, but I cannot find it. I have tried looking up the same problem on the internet, no dice. Not even a mention that this could be security related (I found a mention about strict brower settings earlier but it was related to another problem).
I have uploaded my code on Github here: https://github.com/plafeber/cakephp-tutorial
I would greatly appreciate any feedback. I was under the assumption that if I create the full code set from the tutorial, given of course I run CakePHP 4.1.5 and follow the related Cake 4.x manual, that it would work. However, I already found out that I have to change the line about the use of DefaultPasswordHasher compared to what was in the code. So I can imagine the Tutorial page is not exactly as it should be.
This would be hte correct line about the use of the DefaultPasswordHasher in User.php;
//the use line
use Cake\Auth\DefaultPasswordHasher as AuthDefaultPasswordHasher;
//and the function
protected function _setPassword(string $password) : ?string
{
if (strlen($password) > 0) {
$hasher = new AuthDefaultPasswordHasher();
return $hasher->hash($password);
}
}
The solution to this was to navigate to the Cake install dir (containing the src and config folder and so on), then running the Composer call again. This apparently placed the filed in the right directories and then the error no longer appeared.
I have a similar problem as here
I am using Apache2 server.
I have made a simple extension named extensionV2.so
I can load the extension and use it in my code when i do
extension = extensionV2.so in php.ini.
and use its functions in my php file.
But if i use
<?php
dl('extensionV2.so');
var_dump(get_loaded_modules());
?>
I get the error
Fatal error: Call to undefined function dl() in /var/www/html/My.php on line 9
Note:
I am using php 5.3
According to phpinfo()
Thread Safety - disabled
Safe Mode - Off
enable_dl() = On
I get the desired output via php -r in the terminal. I am aware of dl() not in use anymore via apache2handlers... is there any alternate option to workaround the dl() issue?
You don't need to dl() for loading your extension, if your extension is compatible with your PHP (PHP-extension should match the PHP server in thread safety, API number and compiler version) then, after restarting your server you should see your extension name (in your case extensionV2) in your phpinfo() page, otherwise there is a problem in loading your extension.
EDIT-1
Here is an alternate for using dl() in your code:
// Try to load our extension if it's not already loaded.
if (!extension_loaded('extensionV2')) {
if (strtolower(substr(PHP_OS, 0, 3)) === 'win') {
if (!dl('extensionV2.dll')) return;
} else {
// PHP_SHLIB_SUFFIX gives 'dylib' on MacOS X but modules are 'so'.
if (PHP_SHLIB_SUFFIX === 'dylib') {
if (!dl('extensionV2.so')) return;
} else {
if (!dl('extensionV2.'.PHP_SHLIB_SUFFIX)) return;
}
}
}
I created Extjs.Panel and now I would like to dynamically load a content to it. So I wrote this simple code
Ext.get('contentPanel').load({
url: '#Url.Action("TempView","Home")'
});
After executing this function, panel is populated with TempView, however couple of seconds later I get an error in Extjs library
Microsoft JScript runtime error:Unable to get value of the property
'events': object is null or undefined.
EDIT
I flollowed #DmitryB advice and I used debug version of library. Here is what I found out. It turned out that the problem is in function
getElementEventCache
which is defined in file ext-all-debug.js in line 11108. The function looks this way
getElementEventCache : function(element) {
if (!element) {
return {};
}
var elementCache = Ext.cache[this.getId(element)];
return elementCache.events || (elementCache.events = {});
},
The exception is thrown in the last line, because of the fact that elementCache is null.
Here is the stacktrace from visualstudio
I had a very similar error that was resolved by adding the following line. (from this forum thread)
if(Ext.isIE) {
Ext.enableGarbageCollector=false;
}
I'm using bellow code and work cool. This may help you.
Try this
var content_div = Ext.get(div_id);
content_div.load({
url:your_url,params:{id:'abc'},scripts:true,text: 'Loading...'});
content_div.show();
I have tried several CakePHP file uploaders, but have not been successful' in setting up and making it work. I've settled down with Miles Uploader Plugin and I am doing everything I can to make it work. Installation instructions are excellent and I have followed them to the letter, but I still cant get it to work.
When I post an Article I get the following error:
Warning (2): Illegal offset type in isset or empty [APP/plugins/uploader/controllers/components/uploader.php, line 1104]
}
if (isset($this->_data[$file])) {
I am making the following call in my add articles view
...
echo $form->input('main_image', array('type' => 'file'));
...
And I am using the following in my add action but it is returning false
...
if (!empty($this->data)) {
//This call is not successful which skips to the }else{ display the message below
if ($data = $this->Uploader->upload('main_image')) {
// Upload successful, do whatever
}else{
$this->setFlash('Uploader Error',true);
}
}
...
Can anyone please shed some light on what could possibly be wrong.
** EDIT **
I am not able to try this out right now, but do I need to do the following to make it work:
if ($data = $this->Uploader->upload(data['Article']['main_image'])) {
Thanks,
Spent many hours trying to figure out why it does not work. Finally I gave up last night trying and settled with trying to configure CakePHP's Media Plugin. That now works great. Setup was a breeze.